NAV Navbar
Shell HTTP JavaScript Node.JS Ruby Python Java Go
  • Shotgun REST API v1
  • Authentication
  • Making Requests
  • Handling Responses
  • Access Entity Attachment And Image Data
  • Access Entity Data
  • Access Hierarchy Data
  • Access Preferences
  • Access Schema data
  • Get Access Tokens
  • Get OpenAPI Spec
  • Get Shotgun Server Info
  • Uploading files
  • Object Definitions
  • Shotgun REST API v1

    Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

    This is the reference document for Shotgun's REST API.

    For general information on developing for Shotgun, you can read the documentation on our developer site.

    If you are accessing Shotgun from Python, you could also use our Python API.

    Setting up a development environment

    We have made it easy to use Postman to play with the API. Use the button and instructions below to get started with the API.

    Run in Postman

    1. Download Postman and the collection for the Shotgun REST API using the button above. If you are shown download options, pick the native client.

      Open Collection
    2. Once Postman launches, you should have Shotgun REST API v1 in your collections.

      New Collection
    3. To connect to Shotgun, we need to setup an environment that has the site, login, and password to use. Start by clicking on the gear icon in the upper right of Postman to manage environments.

      Manage Environment
    4. Add a new environment and add keys for host, login, and password. Fill out the values with the account you want to connect as.

      Edit Environment

    5. Select the environment you just created as the active environment.

      Set Environment
    6. Now that credentials are available via the environment, we will use them to get an authentication token the API will use to talk to your Shotgun site. To do this click on the ellipse ("...") menu next to the collection and pick edit.

      Edit Collection
    7. Go to the authorization tab of the collection dialog and click on Get New Access Token.

      Edit Collection Auth
    8. In the resulting dialog click on Request Token.

      Auth Settings
    9. You should see a dialog like the one below that displays the resulting token. Click on Use Token to start being able to use the API. Note: These tokens are only good for a fixed period of time (as determined by a site preference). You will have to repeat the above steps to refresh your token as needed.

      New Token

    Authentication

    The Shotgun REST API uses OAuth 2.0 for authentication.

    It supports the standard OAuth 2.0 grants client_credentials and password plus a custom grant called session_token.

    Like with other well known REST APIs the authentication and authorization process is two steps:

    1. An access token is requested from the server using one of the methods described below. If the credentials passed are valid, the server will return an access token and the number of seconds until the token expires.
    2. The access token is then used in the Authorization header for requests to endpoints that require authorization.

    The table below show which type of Shotgun credentials maps to which OAuth 2.0 grant type.

    Credentials Grant Type
    API Script Name and Key client_credentials
    Username and Password password
    Session Token session_token

    Client Credentials

    Example Client Credentials Request(s)

    curl -X POST https://yoursite.shotgunstudio.com/api/v1/auth/access_token \
      -H 'Content-Type: application/x-www-form-urlencoded' \
      -H 'Accept: application/json' \
      -d "client_id={your_script_name}&client_secret={your_script_key}&grant_type=client_credentials"
    
    curl -X POST https://yoursite.shotgunstudio.com/api/v1/auth/access_token \
      -H 'Content-Type: application/x-www-form-urlencoded' \
      -H 'Accept: application/json' \
      -H 'Authorization: Basic <base64 encoded credentials>'
      -d "grant_type=client_credentials"
    

    Example response

    {
      "token_type": "Bearer",
      "access_token": "eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJsb2NhbGhvc3Q6ODg4OCIsImF1ZCI6ImxvY2FsaG9zdDo4ODg4IiwiZXhwIjoxNTE5OTY0MDUxLCJpYXQiOjE1MTk5NjA0NTEsInBheWxvYWQiOiJFeGFtcGxlIHRva2VuISJ9.HEpJCzma9ftj-hfbR3HySoLsGHs2mH0qyHGLOVOmjzI",
      "expires_in": 3600,
      "refresh_token": "eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJiN2JmMGMzMi00MWM5LTExZTgtODJkMi0wMjQyYWMxOTAwMDgiLCJpc3MiOiJsb2NhbGhvc3Q6ODg4OCIsImF1ZCI6ImxvY2FsaG9zdDo4ODg4L2FwaS92MS9hdXRoL2FjY2Vzc190b2tlbiIsImV4cCI6MTUyNDUyNDMyNiwiaWF0IjoxNTIzOTE5NTI2LCAiZGF0YSI6ICJub3RfaW5mb19mb3JfeW91In0=.z1TxS33vaVOpywxGe5E2NREG3id1Q8b5wxPcF84qG60"
    }
    

    The grant type client_credentials should be used when you are using an API script_name and script_key for authentication.

    The script_name should be passed as the value of client_id and the script_key should be passed as the value of client_secret.

    When using this grant type the credentials can be passed to the server in two ways, using the Authorization header or via the request body in url encoded form format.

    For the Authorization header variant, the credentials should be passed using the standard basic auth format, Authorization: Basic <base64 of '<client_id>:<client_secret>'> and the grant type should be passed as part of the request body.

    For the request body variant, the client_id and client_secret should be send via the request body with other parameters and be in url encoded form format.

    Example: client_id={your_script_name}&client_secret={your_script_key}&grant_type=client_credentials

    Parameters

    Parameter In Type Required Description
    client_id body string true API script name
    client_secret body string true API script key
    grant_type body string true OAuth 2.0 grant type. Should be set to client_credentials
    scope body string false OAuth 2.0 scope. sudo_as_login:<username> is the only scope available
    session_uuid body string false Sets the uuid for the session

    Password Credentials

    Example Password Request

    curl -X POST https://yoursite.shotgunstudio.com/api/v1/auth/access_token \
      -H 'Content-Type: application/x-www-form-urlencoded' \
      -H 'Accept: application/json' \
      -d "username={user_login}&password={user_password}&grant_type=password"
    

    Example response

    {
      "token_type": "Bearer",
      "access_token": "eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJsb2NhbGhvc3Q6ODg4OCIsImF1ZCI6ImxvY2FsaG9zdDo4ODg4IiwiZXhwIjoxNTE5OTY0MDUxLCJpYXQiOjE1MTk5NjA0NTEsInBheWxvYWQiOiJFeGFtcGxlIHRva2VuISJ9.HEpJCzma9ftj-hfbR3HySoLsGHs2mH0qyHGLOVOmjzI",
      "expires_in": 3600,
      "refresh_token": "eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJiN2JmMGMzMi00MWM5LTExZTgtODJkMi0wMjQyYWMxOTAwMDgiLCJpc3MiOiJsb2NhbGhvc3Q6ODg4OCIsImF1ZCI6ImxvY2FsaG9zdDo4ODg4L2FwaS92MS9hdXRoL2FjY2Vzc190b2tlbiIsImV4cCI6MTUyNDUyNDMyNiwiaWF0IjoxNTIzOTE5NTI2LCAiZGF0YSI6ICJub3RfaW5mb19mb3JfeW91In0=.z1TxS33vaVOpywxGe5E2NREG3id1Q8b5wxPcF84qG60"
    }
    

    The grant type password should be used when you are using a user's username and password for authentication.

    Unlike client_credentials, this grant type only supports passing credentials via the request body.

    Parameters

    Parameter In Type Required Description
    username body string true User login
    password body string true User password
    grant_type body string true OAuth 2.0 grant type. Should be set to password
    scope body string false OAuth 2.0 scope. sudo_as_login:<username> is the only scope available
    session_uuid body string false Sets the uuid for the session

    Session Token

    Example Session Token Request

    curl -X POST https://yoursite.shotgunstudio.com/api/v1/auth/access_token \
      -H 'Content-Type: application/x-www-form-urlencoded' \
      -H 'Accept: application/json' \
      -d "session_token={session_token}&grant_type=session_token"
    

    Example response

    {
      "token_type": "Bearer",
      "access_token": "eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJsb2NhbGhvc3Q6ODg4OCIsImF1ZCI6ImxvY2FsaG9zdDo4ODg4IiwiZXhwIjoxNTE5OTY0MDUxLCJpYXQiOjE1MTk5NjA0NTEsInBheWxvYWQiOiJFeGFtcGxlIHRva2VuISJ9.HEpJCzma9ftj-hfbR3HySoLsGHs2mH0qyHGLOVOmjzI",
      "expires_in": 3600,
      "refresh_token": "eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJiN2JmMGMzMi00MWM5LTExZTgtODJkMi0wMjQyYWMxOTAwMDgiLCJpc3MiOiJsb2NhbGhvc3Q6ODg4OCIsImF1ZCI6ImxvY2FsaG9zdDo4ODg4L2FwaS92MS9hdXRoL2FjY2Vzc190b2tlbiIsImV4cCI6MTUyNDUyNDMyNiwiaWF0IjoxNTIzOTE5NTI2LCAiZGF0YSI6ICJub3RfaW5mb19mb3JfeW91In0=.z1TxS33vaVOpywxGe5E2NREG3id1Q8b5wxPcF84qG60"
    }
    

    The grant type session_token is a custom grant type Shotgun has added to support authentication using session tokens.

    With this grant type the session token should be passed as part of the request body along with the grant_type

    Parameters

    Parameter In Type Required Description
    session_token body string true Session token to start request the with
    grant_type body string true Custom OAuth 2.0 grant type. Should be set to session_token

    Refresh Token

    Example Refresh Token Request

    curl -X POST https://yoursite.shotgunstudio.com/api/v1/auth/access_token \
      -H 'Content-Type: application/x-www-form-urlencoded' \
      -H 'Accept: application/json' \
      -d "refresh_token={refresh_token}&grant_type=refresh"
    

    Example response

    {
      "token_type": "Bearer",
      "access_token": "eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJsb2NhbGhvc3Q6ODg4OCIsImF1ZCI6ImxvY2FsaG9zdDo4ODg4IiwiZXhwIjoxNTE5OTY0MDUxLCJpYXQiOjE1MTk5NjA0NTEsInBheWxvYWQiOiJFeGFtcGxlIHRva2VuISJ9.HEpJCzma9ftj-hfbR3HySoLsGHs2mH0qyHGLOVOmjzI",
      "expires_in": 3600,
      "refresh_token": "eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJiN2JmMGMzMi00MWM5LTExZTgtODJkMi0wMjQyYWMxOTAwMDgiLCJpc3MiOiJsb2NhbGhvc3Q6ODg4OCIsImF1ZCI6ImxvY2FsaG9zdDo4ODg4L2FwaS92MS9hdXRoL2FjY2Vzc190b2tlbiIsImV4cCI6MTUyNDUyNDMyNiwiaWF0IjoxNTIzOTE5NTI2LCAiZGF0YSI6ICJub3RfaW5mb19mb3JfeW91In0=.z1TxS33vaVOpywxGe5E2NREG3id1Q8b5wxPcF84qG60"
    }
    

    The grant type refresh allows for a new access token to be generated based on prior authentication. The refresh token is valid for 24 hours and can only be used once to request a new access token (a new refresh token will be generated with the new access token).

    With this grant type the refresh token should be passed as part of the request body along with the grant_type

    Parameters

    Parameter In Type Required Description
    refresh_token body string true The refresh_token that was provided in the access_token response.
    grant_type body string true OAuth 2.0 grant type. Should be set to refresh

    Access Token Response

    Example response

    {
      "token_type": "Bearer",
      "access_token": "eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJsb2NhbGhvc3Q6ODg4OCIsImF1ZCI6ImxvY2FsaG9zdDo4ODg4IiwiZXhwIjoxNTE5OTY0MDUxLCJpYXQiOjE1MTk5NjA0NTEsInBheWxvYWQiOiJFeGFtcGxlIHRva2VuISJ9.HEpJCzma9ftj-hfbR3HySoLsGHs2mH0qyHGLOVOmjzI",
      "expires_in": 3600,
      "refresh_token": "eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJiN2JmMGMzMi00MWM5LTExZTgtODJkMi0wMjQyYWMxOTAwMDgiLCJpc3MiOiJsb2NhbGhvc3Q6ODg4OCIsImF1ZCI6ImxvY2FsaG9zdDo4ODg4L2FwaS92MS9hdXRoL2FjY2Vzc190b2tlbiIsImV4cCI6MTUyNDUyNDMyNiwiaWF0IjoxNTIzOTE5NTI2LCAiZGF0YSI6ICJub3RfaW5mb19mb3JfeW91In0=.z1TxS33vaVOpywxGe5E2NREG3id1Q8b5wxPcF84qG60"
    }
    

    For all grant types the response from the sever has the same format and will contain 4 values, a token type, the access token, the number of seconds the access token is valid for and a refresh token.

    Name Type Description
    token_type string The type of token returned. This value should prefix the access token when sent to the server via the Authorization header.
    access_token string The token value needed to make requests to API endpoint that require authorization.
    expires_in integer The number of seconds the token is valid for. Once this time has passed the token will not longer be usable and a new one will need to be requested.
    refresh_token string This token can be used for 24 hours after creation

    Making Requests

    Example Request

    curl -X POST https://yoursite.shotgunstudio.com/api/v1/entity/projects/1 \
      -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJsb2NhbGhvc3Q6ODg4OCIsImF1ZCI6ImxvY2FsaG9zdDo4ODg4IiwiZXhwIjoxNTE5OTY0MDUxLCJpYXQiOjE1MTk5NjA0NTEsInBheWxvYWQiOiJFeGFtcGxlIHRva2VuISJ9.HEpJCzma9ftj-hfbR3HySoLsGHs2mH0qyHGLOVOmjzI' \
      -H 'Accept: application/json'
    

    Example Response for a valid token

    {
      "data": {
        "id": 1,
        "type": "Project",
        "attributes": {},
        "relationships": {},
        "links": {
          "self": "/api/v1/entity/projects/1"
        }
      },
      "links": {
        "self": "/api/v1/entity/projects/1"
      }
    }
    

    Example Response for an invalid token

    {
        "errors": [
            {
                "id": "99329bfc1513fc6c62766d83c16ee842",
                "status": 401,
                "code": 102,
                "title": "Unauthorized",
                "source": null,
                "detail": "Token Expired",
                "meta": null
            }
        ]
    }
    

    For all protected endpoints the access token will need to be sent via the Authorization header to authorize the request. If the token is invalid in any way, the server will response with a 401 status code and the body will contain a JSON object with the error explaining the issue.

    Header format: Authorization: <token_type> <token_value_here>

    Making Requests

    Filtering

    Filtering Example Request

    curl -X POST https://yoursite.shotgunstudio.com/api/v1/entity/assets?filter[sg_status_list]=ip&filter[sg_asset_type]=Prop \
      -H 'Authorization: Bearer <token>' \
      -H 'Accept: application/json'
    
      curl -X POST https://yoursite.shotgunstudio.com/api/v1/entity/assets?filter[sg_status_list]=ip&filter[sg_asset_type]=Prop,Character,Environment&shot.Shot.code=bunny_010_0020 \
      -H 'Authorization: Bearer <token>' \
      -H 'Accept: application/json'
    

    In Shotgun REST API there are some endpoints that return a paginated array of records of a give type.

    In this case these endpoints also allow for filtering those records to only the ones that interest you.

    This is done by using the filter query string parameter. This parameter is an object and can be repeated multiple times with different keys.

    The key for the object should be the name of the field to be filtered on and the value should be the value required.

    By default, the comparison for values is an is comparison but this can be changed to an in comparison by passing a comma-separated list of values (Ex: ip,res,omt).

    Searching

    Shotgun supports complex filtering to find specific records which is exposed in the REST API as a special endpoint for searching. This is the endpoint to use if you want to make query that is more advanced that what you could express in the query string.

    The search endpoint takes a json document which defines your filters and optionally sorting, paging, and fields to return (these can also be passed via the query string).

    Currently there are two formats for the filters passed, a simple array based one and a more advanced object based one.

    Array Style

    Array Style Request Body Example

    {
      "filters": [
        ["name", "contains", "template"],
        ["is_demo", "is", true]
      ]
    }
    

    Header: Content-Type: application/vnd+shotgun.api3_array+json

    This format takes an array of Basic Conditions as the value for filters.

    Hash Style

    Hash Style Request Body Example

    {
      "filters": {
        "logical_operator": "or",
        "conditions": [
          ["is_demo", "is", true],
          ["sg_status", "in", ["Hold", "Lost"]]
        ]
      }
    }
    

    Header: Content-Type: application/vnd+shotgun.api3_hash+json

    This format takes a Complex Filters which can contain more Complex Filters or Basic Conditions.

    Basic Conditions

    Basic Condition Example

    ["name", "is", "Demo Project"]
    

    The basic condition is a simple array that has three items, a field name, a comparison operator (a.k.a 'relation') and the value or values to compare.

    [<field>, <relation>, <value(s)>]

    Index Name Type Description
    0 field string The name of the Shotgun field to filter against.
    1 relation string Operator to used for the comparison.
    2 value(s) multi This is the value or values to compare against. The data type of this changes based on the field you are comparing against.

    Complex Filters

    Complex Filter Example

    {
      "logical_operator": "or",
      "conditions": [
        {
          "logical_operator": "and",
          "conditions": [
            ["name", "is", "Demo Project"]
            ["sg_status_list", "is" "res"]
          ]
        },
        ["name", "is", "Game Demo"]
      ]
    }
    

    The complex filter object allows for more advanced queries by allowing control over how Basic Conditions are chained together.

    The object has two key, logical_operator and conditions. The logical_operator is the operator to use to connect the conditions and takes one of two values: and and or.

    The conditions key take a value that is an array of Complex Filters and/or Basic Conditions.

    Operators and Arguments

    Operator Arguments
    'is' [field_value] | None
    'is_not' [field_value] | None
    'less_than' [field_value] | None
    'greater_than' [field_value] | None
    'contains' [field_value] | None
    'not_contains' [field_value] | None
    'starts_with' [string]
    'ends_with' [string]
    'between' [[field_value] | None, [field_value] | None]
    'not_between' [[field_value] | None, [field_value] | None]
    'in_last' [[int], 'HOUR' | 'DAY' | 'WEEK' | 'MONTH' | 'YEAR']
    # note that brackets are not literal (eg. ['start_date', 'in_last', 1, 'DAY'])
    'in_next' [[int], 'HOUR' | 'DAY' | 'WEEK' | 'MONTH' | 'YEAR']
    # note that brackets are not literal (eg. ['start_date', 'in_next', 1, 'DAY'])
    'in' [[field_value] | None, ...] # Array of field values
    'type_is' [string] | None # Shotgun entity type
    'type_is_not' [string] | None # Shotgun entity type
    'in_calendar_day' [int] # Offset (e.g. 0 = today, 1 = tomorrow, -1 = yesterday)
    'in_calendar_week' [int] # Offset (e.g. 0 = this week, 1 = next week, -1 = last week)
    'in_calendar_month' [int] # Offset (e.g. 0 = this month, 1 = next month, -1 = last month)
    'name_contains' [string]
    'name_not_contains' [string]
    'name_starts_with' [string]
    'name_ends_with' [string]

    Valid Operators By Data Type

    Field type Operators
    addressing 'is'
    'is_not'
    'contains'
    'not_contains'
    'in'
    'type_is'
    'type_is_not'
    'name_contains'
    'name_not_contains'
    'name_starts_with'
    'name_ends_with'
    checkbox 'is'
    'is_not'
    currency 'is'
    'is_not'
    'less_than'
    'greater_than'
    'between'
    'not_between'
    'in'
    'not_in'
    date 'is'
    'is_not'
    'greater_than'
    'less_than'
    'in_last'
    'not_in_last'
    'in_next'
    'not_in_next'
    'in_calendar_day'
    'in_calendar_week'
    'in_calendar_month'
    'in_calendar_year'
    'between'
    'in'
    'not_in'
    date_time 'is'
    'is_not'
    'greater_than'
    'less_than'
    'in_last'
    'not_in_last'
    'in_next'
    'not_in_next'
    'in_calendar_day'
    'in_calendar_week'
    'in_calendar_month'
    'in_calendar_year'
    'between'
    'in'
    'not_in'
    duration 'is'
    'is_not'
    'greater_than'
    'less_than'
    'between'
    'in'
    'not_in'
    entity 'is'
    'is_not'
    'type_is'
    'type_is_not'
    'name_contains'
    'name_not_contains'
    'name_is'
    'in'
    'not_in'
    float 'is'
    'is_not'
    'greater_than'
    'less_than'
    'between'
    'in'
    'not_in'
    image 'is' ** Note: For both 'is' and 'is_not', the only supported value is None,
    'is_not' ** which supports detecting the presence or lack of a thumbnail.
    list 'is'
    'is_not'
    'in'
    'not_in'
    multi_entity 'is' ** Note: when used on multi_entity, this functions as you would expect 'contains' to function
    'is_not'
    'type_is'
    'type_is_not'
    'name_contains'
    'name_not_contains'
    'in'
    'not_in'
    number 'is'
    'is_not'
    'less_than'
    'greater_than'
    'between'
    'not_between'
    'in'
    'not_in'
    password ** Filtering by this data type field not supported
    percent 'is'
    'is_not'
    'greater_than'
    'less_than'
    'between'
    'in'
    'not_in'
    serializable ** Filtering by this data type field not supported
    status_list 'is'
    'is_not'
    'in'
    'not_in'
    summary ** Filtering by this data type field not supported
    text 'is'
    'is_not'
    'contains'
    'not_contains'
    'starts_with'
    'ends_with'
    'in'
    'not_in'
    timecode 'is'
    'is_not'
    'greater_than'
    'less_than'
    'between'
    'in'
    'not_in'
    url ** Filtering by this data type field is not supported

    Batching

    Shotgun supports batch execution of multiple requests as a single transaction. The supported request types are create, update, and delete. Because all requests are performed as a single transaction, they either all complete successfully or none do.

    Create Example

    {
      "requests": [
        {
          "request_type": "create",
          "entity": "Project",
          "data": {
            "code": "my_new_project",
            "name": "My New Project"
          }
        }
      ]
    }
    

    Update Example

    {
      "requests": [
        {
          "request_type": "update",
          "entity": "Project",
          "record_id": 86,
          "data": {
            "name": "Some New Project Name"
          }
        }
      ]
    }
    

    Delete Example

    {
      "requests": [
        {
          "request_type": "delete",
          "entity": "Project",
          "record_id": 86,
        }
      ]
    }
    

    Multiple Requests Example

    {
      "requests": [
        {
          "request_type": "create",
          "entity": "Project",
          "data": {
            "code": "my_new_project",
            "name": "My New Project"
          }
        },
        {
          "request_type": "update",
          "entity": "Project",
          "record_id": 86,
          "data": {
            "name": "Some New Project Name"
          }
        },
        {
          "request_type": "delete",
          "entity": "Project",
          "record_id": 86,
        }
      ]
    }
    

    Data Types

    Name Type Example/Format Notes
    addressing array [{'type': "HumanUser" or "Group", "id": <int>}, ...]
    checkbox bool true | false
    color string 255,0,0 | pipeline_step pipeline_step indicates the Task color inherits from the Pipeline Step color.
    currency float | null Range: -9999999999999.99 to 9999999999999.99
    date string | null YYYY-MM-DD Year must be >= 1970
    date_time string | null YYYY-MM-DDThh:mm:ssZ Datetimes must be in the ISO8601 format.
    duration int | null Range: -2147483648 to 2147483647.
    Length of time, in minutes
    entity object | null {'type': <string>, "id": <int>}
    float float | null Range: -9999999999999.99 to 9999999999999.99
    footage string | null FF-ff Frames must be < Preferences value for “Advanced > Number of frames per foot of film”
    Format matches Preference value for “Formatting > Display of footage fields”. Example above is default.F=Feet f=Frames.
    image string | null Read-only
    list string | null
    multi_entity array [{'type': <string>, "id": <int>}, ...]
    number int | null Range: -2147483648 to 2147483647.
    password string | null Returned values of password fields are replaced with ******* for security
    number int | null Range: -2147483648 to 2147483647.
    serializable object | null
    status_list string | null
    text string | null
    timecode int | null Range: -2147483648 to 2147483647.
    Length of time, in milliseconds (1000 = 1 second)
    url (file/link field) object | null

    Handling Responses

    For responses the REST API requests we have adopted the JSONAPI spec. The spec gives us a standard convention to follow for data returned and has many client libraries in many different languages that could be useful for getting up and running quickly in your language of choice.

    Top Level Data Structure

    Example

    {
      "data": {
        "id": 1,
        "type": "Project",
        "attributes": {},
        "relationships": {},
        "links": {
          "self": "/api/v1/entity/projects/1"
        }
      },
      "errors": [],
      "links": {
        "self": "/api/v1/entity/projects/1"
      }
    }
    

    The top level of the data object contains 3 main keys, data, errors and links.

    The data key is where any data requested will be stored. This can be either an array if multiple items are requested or an object if a single item is requested.

    The errors key is an array that contains any errors that happened while processing the request. In most cases, the errors key will not be present if there were no errors during the request.

    The links key is a object that contains useful links to other resources based on what is requested. One of its primary uses is for pagination. When viewing paginated results the links object will contain pointers to the current, next, and previous pages of results.

    Parameters

    Name Type Description
    data array or object The document's "primary data". This can be a single record object or an array of many.
    errors array array of error objects
    links object object containing links to related data

    Entity Record Object

    Example

    {
      "id": 82,
      "type": "Project",
      "attributes": {
        "name": "Demo Project"
      },
      "relationships": {
        "users": [
          {
            "id": 19,
            "name": "Artist 1",
            "type": "HumanUser"
          },
          {
            "id": 18,
            "name": "Artist 2",
            "type": "HumanUser"
          }
        ],
        "created_by": {
          "id": 24,
          "name": "Shotgun Support",
          "type": "HumanUser"
        }
      },
      "links": {
        "self": "/api/v1/projects/82"
      }
    }
    

    The entity record object contains information about the entity record requested. By default it contains, the record id, the record type and a link to the endpoint for describing the individual record. Additionally it can contain an attributes object that stores the field values for the record and a relationships object that stores any connections to other records.

    Parameters

    Name Type Description
    id integer The id of the record
    type string The type of record. Ex 'Shot'
    attributes object This objects contains fields that are not Entity or Multi-Entity relations. The keys of the object are the Shotgun field names.
    relationships object This objects contains fields that are Entity or Multi-Entity relations. The keys of the object are the Shotgun field names and values can be either arrays or objects depending on the field type.
    links object a object that contains links to related data. Most often this contains the link the endpoint where the individual record can be accessed.

    Error Object

    Example

    {
      "id": "a4c9279479129dcd4413145f1fcdbd78",
      "status": 400,
      "code": 103,
      "title": "Request Parameters invalid.",
      "source": {
        "entity": [
          "entity is not valid"
        ]
      },
      "detail": null,
      "meta": null
    }
    

    The error object provide additional information about problems encountered while performing a request.

    Parameters

    Name Type Description
    id string A unique identifier for this particular occurrence of the problem.
    status integer The HTTP status code.
    code integer Shotgun defined error codes.
    title string A short, human-readable summary of the problem.
    detail string A human-readable explanation specific to this occurrence of the problem.
    source object An object containing references to the source of the error.
    meta string Non-standard meta-information about the error.

    Access Entity Attachment And Image Data

    The attachment and image field access endpoint gives you the ability to retrieve information about a file and to download it.

    Read file field

    Code samples

    # You can also use wget
    curl -X GET https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/{field_name} \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    GET https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/{field_name} HTTP/1.1
    Host: shotgun.mystudio.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/{field_name}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/{field_name}',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.get 'https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/{field_name}',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.get('https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/{field_name}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/{field_name}");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/{field_name}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /entity/{entity}/{record_id}/{field_name}

    The endpoint provides access to information about an image or attachment field. You can optionally use the alt query parameter to download the associated image or attachment.

    Parameters

    Parameter In Type Required Description
    entity path string true The name of the entity type to interact with. The entity name should be passed in its plural snake_case form. Ex: CustomNonProjectEntity01 would be custom_non_project_entity_01s.
    record_id path integer true Id of the record to retrieve file information from.
    field_name path string true Name of the field to retrieve file information from. The field must be an attachment or an image.
    alt query string false Optional query parameter to download the file instead of getting the field value.

    Enumerated Values

    Parameter Value
    alt original
    alt thumbnail

    Example responses

    200 undefined

    {
      "data": {
        "url": "https://sg-media-staging-usor-01.s3.amazonaws.com/1fe6dc157568e9ae589d66c109ace519dfee3699/f401cb001bdab191fdb6bbaa3d1a98f442a0fad6/08_a-team_001_ANIM_001.mov?AWSAccessKeyId=AKIAIZVDUP76QG4A6G3A&Expires=1524506637&Signature=Ylx%2BP3V7wYqNC6HtNv3crAU5HIM%3D&response-content-disposition=filename%3D%2208_a-team_001_ANIM_001.mov%22&x-amz-meta-user-id=85&x-amz-meta-user-type=HumanUser",
        "name": "08_a-team_001_ANIM_001.mov",
        "content_type": "video/quicktime",
        "link_type": "upload",
        "type": "Attachment",
        "id": 111
      },
      "links": {
        "self": "/api/v1/entity/versions/6003/sg_uploaded_movie"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Representation of a image or attachment field of a single record. FieldHashResponse
    401 Unauthorized Request rejected due to invalid credentials. ErrorResponse
    404 Not Found Record does not exist. ErrorResponse

    Access Entity Data

    The entity endpoints give you the ability to create, update, read, delete and revive entity records for your Shotgun site.

    Read all records

    Code samples

    # You can also use wget
    curl -X GET https://yoursite.shotgunstudio.com/api/v1/entity/{entity} \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    GET https://yoursite.shotgunstudio.com/api/v1/entity/{entity} HTTP/1.1
    Host: shotgun.mystudio.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://yoursite.shotgunstudio.com/api/v1/entity/{entity}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://yoursite.shotgunstudio.com/api/v1/entity/{entity}',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.get 'https://yoursite.shotgunstudio.com/api/v1/entity/{entity}',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.get('https://yoursite.shotgunstudio.com/api/v1/entity/{entity}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://yoursite.shotgunstudio.com/api/v1/entity/{entity}");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://yoursite.shotgunstudio.com/api/v1/entity/{entity}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /entity/{entity}

    The endpoints retrieves records for a given entity. It allows the use simple filtering op. For more information see the Filtering section.

    Parameters

    Parameter In Type Required Description
    entity path string true The name of the entity type to interact with. The entity name should be passed in its plural snake_case form. Ex: CustomNonProjectEntity01 would be custom_non_project_entity_01s.
    filter query object false Filters by columns on the entity queried. The default is a is comparison but an in comparison can be done by passing a comma-separated list of values. Syntax: filter[<field_name>]=<value>
    fields query string false List of comma-separated fields to return. If * is specified, all fields will be returned.
    sort query string false List of comma-separated fields to use for sorting records. By default, fields are sorted by ascending order. Prefixing a field's name with - will sort records with that field in decreasing order.
    page query PaginationParameter false Parameters for setting the pagination. Page size and page number can be independently specified.
    options query OptionsParameter false Optional settings for the request. Hash of different configuration options. Ex. options[return_only]=retired

    Example responses

    200 undefined

    {
      "data": [
        {
          "id": 82,
          "type": "Project",
          "attributes": {
            "name": "Demo Project"
          },
          "relationships": {
            "users": [
              {
                "id": 19,
                "name": "Artist 1",
                "type": "HumanUser"
              },
              {
                "id": 18,
                "name": "Artist 2",
                "type": "HumanUser"
              }
            ],
            "created_by": {
              "id": 24,
              "name": "Shotgun Support",
              "type": "HumanUser"
            }
          },
          "links": {
            "self": "/api/v1/projects/82"
          }
        }
      ],
      "links": {
        "self": "/api/v1/projects?page%5Bnumber%5D=2&page%5Bsize%5D=500",
        "next": "/api/v1/projects?page%5Bnumber%5D=3&page%5Bsize%5D=500",
        "prev": "/api/v1/projects?page%5Bnumber%5D=1&page%5Bsize%5D=500"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Records have been retrieved. PaginatedRecordResponse
    400 Bad Request Response for errors related to the parameters passed. ErrorResponse
    401 Unauthorized Request rejected due to invalid credentials. ErrorResponse

    Create a new record

    Code samples

    # You can also use wget
    curl -X POST https://yoursite.shotgunstudio.com/api/v1/entity/{entity} \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    POST https://yoursite.shotgunstudio.com/api/v1/entity/{entity} HTTP/1.1
    Host: shotgun.mystudio.com
    Content-Type: application/json
    Accept: application/json
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://yoursite.shotgunstudio.com/api/v1/entity/{entity}',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    const inputBody = '{
      "name": "Red Sun",
      "users": [
        {
          "id": 19,
          "name": "Artist 1",
          "type": "HumanUser"
        },
        {
          "id": 18,
          "name": "Artist 2",
          "type": "HumanUser"
        }
      ]
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://yoursite.shotgunstudio.com/api/v1/entity/{entity}',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.post 'https://yoursite.shotgunstudio.com/api/v1/entity/{entity}',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.post('https://yoursite.shotgunstudio.com/api/v1/entity/{entity}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://yoursite.shotgunstudio.com/api/v1/entity/{entity}");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("POST");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json"},
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://yoursite.shotgunstudio.com/api/v1/entity/{entity}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /entity/{entity}

    The endpoint allows for the creation of an entity record.

    Body parameter

    {
      "name": "Red Sun",
      "users": [
        {
          "id": 19,
          "name": "Artist 1",
          "type": "HumanUser"
        },
        {
          "id": 18,
          "name": "Artist 2",
          "type": "HumanUser"
        }
      ]
    }
    

    Parameters

    Parameter In Type Required Description
    entity path string true The name of the entity type to interact with. The entity name should be passed in its plural snake_case form. Ex: CustomNonProjectEntity01 would be custom_non_project_entity_01s.
    body body CreateOrUpdateRequest true The body should contain the key value pairs for the fields you want to set.
    » additionalProperties body string false Each key is the name of a field in the Shotgun database.

    Example responses

    201 undefined

    {
      "data": {
        "type": "Project",
        "attributes": {
          "tank_name": null,
          "end_date": null,
          "duration": null,
          "tracking_settings": {
            "navchains": {
              "Asset": "Asset.sg_asset_type",
              "Shot": "Shot.sg_sequence",
              "Cut": "Cut.entity",
              "CutItem": "CutItem.cut.entity"
            }
          },
          "color": "129,183,255",
          "client_site_settings_saved": false,
          "last_accessed_by_current_user": null,
          "code": null,
          "start_date": null,
          "sg_status": null,
          "cached_display_name": "Film Template",
          "billboard": null,
          "sg_description": null,
          "filmstrip_image": null,
          "is_template": true,
          "created_at": "2016-03-11T01:54:00Z",
          "updated_at": "2018-02-28T22:46:35Z",
          "sg_type": "Feature",
          "image": null,
          "landing_page_url": "/page/project_overview?project_id=82",
          "archived": false,
          "is_demo": false,
          "current_user_favorite": false,
          "name": "Film Template"
        },
        "relationships": {
          "users": {
            "data": [
              {
                "id": 19,
                "name": "Artist 1",
                "type": "HumanUser"
              },
              {
                "id": 18,
                "name": "Artist 2",
                "type": "HumanUser"
              },
              {
                "id": 66,
                "name": "Manager 1",
                "type": "HumanUser"
              }
            ],
            "links": {
              "self": "/api/v1/entity/projects/82/relationships/users"
            }
          },
          "layout_project": {
            "data": {
              "id": 70,
              "name": "Demo: Animation",
              "type": "Project"
            },
            "links": {
              "self": "/api/v1/entity/projects/82/relationships/layout_project",
              "related": "/api/v1/entity/projects/70"
            }
          },
          "phases": {
            "data": [],
            "links": {
              "self": "/api/v1/entity/projects/82/relationships/phases"
            }
          },
          "created_by": {
            "data": {
              "id": 24,
              "name": "Shotgun Support",
              "type": "HumanUser"
            },
            "links": {
              "self": "/api/v1/entity/projects/82/relationships/created_by",
              "related": "/api/v1/entity/human_users/24"
            }
          },
          "updated_by": {
            "data": {
              "id": 24,
              "name": "Shotgun Support",
              "type": "HumanUser"
            },
            "links": {
              "self": "/api/v1/entity/projects/82/relationships/updated_by",
              "related": "/api/v1/entity/human_users/24"
            }
          },
          "tags": {
            "data": [],
            "links": {
              "self": "/api/v1/entity/projects/82/relationships/tags"
            }
          },
          "task_templates": {
            "data": [],
            "links": {
              "self": "/api/v1/entity/projects/82/relationships/task_templates"
            }
          }
        },
        "id": 82
      },
      "links": {
        "self": "/api/v1/entity/projects/82"
      }
    }
    

    Responses

    Status Meaning Description Schema
    201 Created Record has been created. SingleRecordResponse
    401 Unauthorized Request rejected due to invalid credentials. ErrorResponse

    Batch execute requests

    Code samples

    # You can also use wget
    curl -X POST https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/_batch \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    POST https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/_batch HTTP/1.1
    Host: shotgun.mystudio.com
    Content-Type: application/json
    Accept: application/json
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/_batch',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    const inputBody = '{
      "requests": [
        {
          "request_type": "create",
          "entity": "Project",
          "data": {
            "code": "new project"
          }
        }
      ]
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/_batch',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.post 'https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/_batch',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.post('https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/_batch', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/_batch");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("POST");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json"},
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/_batch", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /entity/{entity}/_batch

    The endpoint batches the execution of multiple create, update, and delete requests together. For more information see the Batching section.

    Body parameter

    {
      "requests": [
        {
          "request_type": "create",
          "entity": "Project",
          "data": {
            "code": "new project"
          }
        }
      ]
    }
    

    Parameters

    Parameter In Type Required Description
    options query OptionsParameter false Optional settings for the request. Hash of different configuration options. Ex. options[return_only]=retired
    body body object true The body should contain an array of requests to be batch executed.
    » request_type body string false No description
    » entity body string false The entity type associated with the request.
    » record_id body integer false The record id associated with the request.
    » data body object false The entity fields, as keys, and their associated values.

    Enumerated Values

    Parameter Value
    » request_type create
    » request_type update
    » request_type delete

    Example responses

    200 undefined

    {
      "data": []
    }
    

    Responses

    Status Meaning Description Schema
    200 OK All batched requests completed successfully. BatchedRequestsResponse
    400 Bad Request Response for errors related to the parameters passed. ErrorResponse
    401 Unauthorized Request rejected due to invalid credentials. ErrorResponse

    Search all records

    Code samples

    # You can also use wget
    curl -X POST https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/_search \
      -H 'Content-Type: application/vnd+shotgun.api3_array+json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    POST https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/_search HTTP/1.1
    Host: shotgun.mystudio.com
    Content-Type: application/vnd+shotgun.api3_array+json
    Accept: application/json
    
    
    var headers = {
      'Content-Type':'application/vnd+shotgun.api3_array+json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/_search',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    const inputBody = '{
      "filters": {
        "logical_operator": "or",
        "conditions": [
          [
            "is_demo",
            "is",
            true
          ],
          [
            "sg_status",
            "in",
            [
              "Hold",
              "Lost"
            ]
          ]
        ]
      }
    }';
    const headers = {
      'Content-Type':'application/vnd+shotgun.api3_array+json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/_search',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/vnd+shotgun.api3_array+json',
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.post 'https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/_search',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/vnd+shotgun.api3_array+json',
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.post('https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/_search', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/_search");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("POST");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd+shotgun.api3_array+json"},
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/_search", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /entity/{entity}/_search

    The endpoint retrieves records for a given entity. It allows to use rich filtering functions. For more information see the Searching section.

    Body parameter

    {
      "filters": {
        "logical_operator": "or",
        "conditions": [
          [
            "is_demo",
            "is",
            true
          ],
          [
            "sg_status",
            "in",
            [
              "Hold",
              "Lost"
            ]
          ]
        ]
      }
    }
    
    Parameter In Type Required Description
    entity path string true The name of the entity type to interact with. The entity name should be passed in its plural snake_case form. Ex: CustomNonProjectEntity01 would be custom_non_project_entity_01s.
    fields query string false List of comma-separated fields to return. If * is specified, all fields will be returned.
    sort query string false List of comma-separated fields to use for sorting records. By default, fields are sorted by ascending order. Prefixing a field's name with - will sort records with that field in decreasing order.
    page query PaginationParameter false Parameters for setting the pagination. Page size and page number can be independently specified.
    options query OptionsParameter false Optional settings for the request. Hash of different configuration options. Ex. options[return_only]=retired
    body body SearchRequest true No description
    » filters body any false No description
    »» anonymous body [FilterCondition] false No description
    »»» anonymous body string false No description
    »»» anonymous body integer false No description
    »»» anonymous body boolean false No description
    »»» anonymous body array false No description
    »»» anonymous body object false No description
    »» anonymous body FilterHash false No description
    »»» logical_operator body string false No description
    »»» conditions body any false No description
    »»»» anonymous body [FilterCondition] false No description
    »»»» anonymous body FilterHash false No description
    »»»» anonymous body any false No description

    Enumerated Values

    Parameter Value
    »»» logical_operator and
    »»» logical_operator or

    Example responses

    200 undefined

    {
      "data": [
        {
          "id": 82,
          "type": "Project",
          "attributes": {
            "name": "Demo Project"
          },
          "relationships": {
            "users": [
              {
                "id": 19,
                "name": "Artist 1",
                "type": "HumanUser"
              },
              {
                "id": 18,
                "name": "Artist 2",
                "type": "HumanUser"
              }
            ],
            "created_by": {
              "id": 24,
              "name": "Shotgun Support",
              "type": "HumanUser"
            }
          },
          "links": {
            "self": "/api/v1/projects/82"
          }
        }
      ],
      "links": {
        "self": "/api/v1/projects?page%5Bnumber%5D=2&page%5Bsize%5D=500",
        "next": "/api/v1/projects?page%5Bnumber%5D=3&page%5Bsize%5D=500",
        "prev": "/api/v1/projects?page%5Bnumber%5D=1&page%5Bsize%5D=500"
      }
    }
    
    Status Meaning Description Schema
    200 OK Records have been retrieved. PaginatedRecordResponse
    401 Unauthorized Request rejected due to invalid credentials. ErrorResponse

    Search text entries

    Code samples

    # You can also use wget
    curl -X POST https://yoursite.shotgunstudio.com/api/v1/entity/_text_search \
      -H 'Content-Type: application/vnd+shotgun.api3_array+json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    POST https://yoursite.shotgunstudio.com/api/v1/entity/_text_search HTTP/1.1
    Host: shotgun.mystudio.com
    Content-Type: application/vnd+shotgun.api3_array+json
    Accept: application/json
    
    
    var headers = {
      'Content-Type':'application/vnd+shotgun.api3_array+json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://yoursite.shotgunstudio.com/api/v1/entity/_text_search',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    const inputBody = '{
      "text": "Bunny",
      "entity_types": {
        "Project": {
          "logical_operator": "and",
          "conditions": [
            [
              "is_demo",
              "is",
              true
            ]
          ]
        }
      },
      "sort": "-id",
      "page": {
        "number": 1,
        "size": 20
      }
    }';
    const headers = {
      'Content-Type':'application/vnd+shotgun.api3_array+json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://yoursite.shotgunstudio.com/api/v1/entity/_text_search',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/vnd+shotgun.api3_array+json',
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.post 'https://yoursite.shotgunstudio.com/api/v1/entity/_text_search',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/vnd+shotgun.api3_array+json',
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.post('https://yoursite.shotgunstudio.com/api/v1/entity/_text_search', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://yoursite.shotgunstudio.com/api/v1/entity/_text_search");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("POST");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd+shotgun.api3_array+json"},
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://yoursite.shotgunstudio.com/api/v1/entity/_text_search", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /entity/_text_search

    The endpoint searches for entities of the given type(s) and returns a list of basic entity data that fits the search. Rich filters can be used to narrow down searches to entities that match the filters.

    Body parameter

    {
      "text": "Bunny",
      "entity_types": {
        "Project": {
          "logical_operator": "and",
          "conditions": [
            [
              "is_demo",
              "is",
              true
            ]
          ]
        }
      },
      "sort": "-id",
      "page": {
        "number": 1,
        "size": 20
      }
    }
    
    Parameter In Type Required Description
    body body TextSearchRequest true No description
    » additionalProperties body object false With any entity name given as a key, the value of this property is either a FilterHash or a FilterArray
    »» anonymous body [FilterCondition] false No description
    »»» anonymous body string false No description
    »»» anonymous body integer false No description
    »»» anonymous body boolean false No description
    »»» anonymous body array false No description
    »»» anonymous body object false No description
    »» anonymous body FilterHash false No description
    »»» logical_operator body string false No description
    »»» conditions body any false No description
    »»»» anonymous body [FilterCondition] false No description
    »»»» anonymous body FilterHash false No description
    »»»» anonymous body any false No description
    »»» page body PaginationParameter false No description
    »»»» size body integer false The number of records to be returned pre page.
    »»»» number body integer false The page of records to be returned.
    »»» text body string false Text to search for in Shotgun.
    »»» sort body string false List of comma-separated fields to use for sorting records. By default, fields are sorted by ascending order. Prefixing a field's name with - will sort records with that field in decreasing order.

    Enumerated Values

    Parameter Value
    »»» logical_operator and
    »»» logical_operator or

    Example responses

    200 undefined

    {
      "data": [
        {
          "id": 82,
          "type": "Project",
          "attributes": {
            "name": "Demo Project"
          },
          "relationships": {
            "users": [
              {
                "id": 19,
                "name": "Artist 1",
                "type": "HumanUser"
              },
              {
                "id": 18,
                "name": "Artist 2",
                "type": "HumanUser"
              }
            ],
            "created_by": {
              "id": 24,
              "name": "Shotgun Support",
              "type": "HumanUser"
            }
          },
          "links": {
            "self": "/api/v1/projects/82"
          }
        }
      ],
      "links": {
        "self": "/api/v1/projects?page%5Bnumber%5D=2&page%5Bsize%5D=500",
        "next": "/api/v1/projects?page%5Bnumber%5D=3&page%5Bsize%5D=500",
        "prev": "/api/v1/projects?page%5Bnumber%5D=1&page%5Bsize%5D=500"
      }
    }
    
    Status Meaning Description Schema
    200 OK Records have been retrieved. PaginatedRecordResponse
    401 Unauthorized Request rejected due to invalid credentials. ErrorResponse

    Summarize field data

    Code samples

    # You can also use wget
    curl -X POST https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/_summarize \
      -H 'Content-Type: application/vnd+shotgun.api3_array+json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    POST https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/_summarize HTTP/1.1
    Host: shotgun.mystudio.com
    Content-Type: application/vnd+shotgun.api3_array+json
    Accept: application/json
    
    
    var headers = {
      'Content-Type':'application/vnd+shotgun.api3_array+json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/_summarize',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    const inputBody = '{
      "filters": [
        [
          "project",
          "is",
          {
            "type": "Project",
            "id": 4
          }
        ]
      ],
      "summary_fields": [
        {
          "field": "id",
          "type": "count"
        }
      ],
      "grouping": [
        {
          "field": "sg_asset_type",
          "type": "exact",
          "direction": "asc"
        }
      ],
      "options": {
        "include_archived_projects": true
      }
    }';
    const headers = {
      'Content-Type':'application/vnd+shotgun.api3_array+json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/_summarize',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/vnd+shotgun.api3_array+json',
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.post 'https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/_summarize',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/vnd+shotgun.api3_array+json',
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.post('https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/_summarize', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/_summarize");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("POST");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd+shotgun.api3_array+json"},
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/_summarize", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /entity/{entity}/_summarize

    The endpoint provides the same functionality as the summaries in the UI. You can specify one or more fields to summarize, choose the summary type for each, and optionally group the results which will return summary information for each group as well as the total for the query.

    Body parameter

    {
      "filters": [
        [
          "project",
          "is",
          {
            "type": "Project",
            "id": 4
          }
        ]
      ],
      "summary_fields": [
        {
          "field": "id",
          "type": "count"
        }
      ],
      "grouping": [
        {
          "field": "sg_asset_type",
          "type": "exact",
          "direction": "asc"
        }
      ],
      "options": {
        "include_archived_projects": true
      }
    }
    

    Parameters

    Parameter In Type Required Description
    entity path string true The name of the entity type to interact with. The entity name should be passed in its plural snake_case form. Ex: CustomNonProjectEntity01 would be custom_non_project_entity_01s.
    body body SummarizeRequest true No description
    » summary_fields body [object] false List of summaries to perform.
    »» field body string false The field name you are summarizing.
    »» type body string false The type of summary you are performing on the field. Summary types depend of the type of field you’re summarizing.
    » filters body any false No description
    »» anonymous body [FilterCondition] false No description
    »»» anonymous body string false No description
    »»» anonymous body integer false No description
    »»» anonymous body boolean false No description
    »»» anonymous body array false No description
    »»» anonymous body object false No description
    »» anonymous body FilterHash false No description
    »»» logical_operator body string false No description
    »»» conditions body any false No description
    »»»» anonymous body [FilterCondition] false No description
    »»»» anonymous body FilterHash false No description
    »»»» anonymous body any false No description
    »»» grouping body [object] false Allows to group records by certain fields to aggregate the results in different groups.
    »»»» field body string false A field name to group results by.
    »»»» type body string false A string indicating the type of grouping to perform for each group. Grouping types depend on the type of field you are grouping on.
    »»»» direction body string false A string that sets the order to display the grouped results.
    »»» options body object false Optional settings for the request.
    »»»» include_archived_projects body boolean false If enabled, the response will include records that are connected to archived projects. Defaults to false.

    Enumerated Values

    Parameter Value
    »» type record_count
    »» type count
    »» type sum
    »» type maximum
    »» type minimum
    »» type average
    »» type earliest
    »» type latest
    »» type percentage
    »» type status_percentage
    »» type status_list
    »» type checked
    »» type unchecked
    »»» logical_operator and
    »»» logical_operator or
    »»»» type exact
    »»»» type tens
    »»»» type hundreds
    »»»» type thousands
    »»»» type tensofthousands
    »»»» type hundredsofthousands
    »»»» type millions
    »»»» type day
    »»»» type week
    »»»» type month
    »»»» type quarter
    »»»» type year
    »»»» type clustered_date
    »»»» type oneday
    »»»» type fivedays
    »»»» type entitytype
    »»»» type firstletter
    »»»» direction asc
    »»»» direction desc

    Example responses

    200 undefined

    {
      "data": {
        "summaries": {
          "id": 3
        },
        "groups": [
          {
            "group_name": "Character",
            "group_value": "Character",
            "summaries": {
              "id": 3
            }
          },
          {
            "group_name": "Plate",
            "group_value": "Plate",
            "summaries": {
              "id": 2
            }
          }
        ]
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Summary has been produced. SummarizeResponse
    401 Unauthorized Request rejected due to invalid credentials. ErrorResponse

    Read one record

    Code samples

    # You can also use wget
    curl -X GET https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id} \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    GET https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id} HTTP/1.1
    Host: shotgun.mystudio.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.get 'https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.get('https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /entity/{entity}/{record_id}

    The endpoint retrieves a single entity record.

    Parameters

    Parameter In Type Required Description
    entity path string true The name of the entity type to interact with. The entity name should be passed in its plural snake_case form. Ex: CustomNonProjectEntity01 would be custom_non_project_entity_01s.
    record_id path integer true Id of the record to retrieve.
    fields query string false List of comma-separated fields to return. If * is specified, all fields will be returned. Default: *
    options query OptionsParameter false Optional settings for the request. Hash of different configuration options. Ex. options[return_only]=retired

    Example responses

    200 undefined

    {
      "data": {
        "type": "Project",
        "attributes": {
          "tank_name": null,
          "end_date": null,
          "duration": null,
          "tracking_settings": {
            "navchains": {
              "Asset": "Asset.sg_asset_type",
              "Shot": "Shot.sg_sequence",
              "Cut": "Cut.entity",
              "CutItem": "CutItem.cut.entity"
            }
          },
          "color": "129,183,255",
          "client_site_settings_saved": false,
          "last_accessed_by_current_user": null,
          "code": null,
          "start_date": null,
          "sg_status": null,
          "cached_display_name": "Film Template",
          "billboard": null,
          "sg_description": null,
          "filmstrip_image": null,
          "is_template": true,
          "created_at": "2016-03-11T01:54:00Z",
          "updated_at": "2018-02-28T22:46:35Z",
          "sg_type": "Feature",
          "image": null,
          "landing_page_url": "/page/project_overview?project_id=82",
          "archived": false,
          "is_demo": false,
          "current_user_favorite": false,
          "name": "Film Template"
        },
        "relationships": {
          "users": {
            "data": [
              {
                "id": 19,
                "name": "Artist 1",
                "type": "HumanUser"
              },
              {
                "id": 18,
                "name": "Artist 2",
                "type": "HumanUser"
              },
              {
                "id": 66,
                "name": "Manager 1",
                "type": "HumanUser"
              }
            ],
            "links": {
              "self": "/api/v1/entity/projects/82/relationships/users"
            }
          },
          "layout_project": {
            "data": {
              "id": 70,
              "name": "Demo: Animation",
              "type": "Project"
            },
            "links": {
              "self": "/api/v1/entity/projects/82/relationships/layout_project",
              "related": "/api/v1/entity/projects/70"
            }
          },
          "phases": {
            "data": [],
            "links": {
              "self": "/api/v1/entity/projects/82/relationships/phases"
            }
          },
          "created_by": {
            "data": {
              "id": 24,
              "name": "Shotgun Support",
              "type": "HumanUser"
            },
            "links": {
              "self": "/api/v1/entity/projects/82/relationships/created_by",
              "related": "/api/v1/entity/human_users/24"
            }
          },
          "updated_by": {
            "data": {
              "id": 24,
              "name": "Shotgun Support",
              "type": "HumanUser"
            },
            "links": {
              "self": "/api/v1/entity/projects/82/relationships/updated_by",
              "related": "/api/v1/entity/human_users/24"
            }
          },
          "tags": {
            "data": [],
            "links": {
              "self": "/api/v1/entity/projects/82/relationships/tags"
            }
          },
          "task_templates": {
            "data": [],
            "links": {
              "self": "/api/v1/entity/projects/82/relationships/task_templates"
            }
          }
        },
        "id": 82
      },
      "links": {
        "self": "/api/v1/entity/projects/82"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Record has been retrieved. SingleRecordResponse
    401 Unauthorized Request rejected due to invalid credentials. ErrorResponse
    404 Not Found Record does not exist. ErrorResponse

    Update an existing record

    Code samples

    # You can also use wget
    curl -X PUT https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id} \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    PUT https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id} HTTP/1.1
    Host: shotgun.mystudio.com
    Content-Type: application/json
    Accept: application/json
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}',
      method: 'put',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    const inputBody = '{
      "name": "Red Sun",
      "users": [
        {
          "id": 19,
          "name": "Artist 1",
          "type": "HumanUser"
        },
        {
          "id": 18,
          "name": "Artist 2",
          "type": "HumanUser"
        }
      ]
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}',
    {
      method: 'PUT',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.put 'https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.put('https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("PUT");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json"},
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("PUT", "https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    PUT /entity/{entity}/{record_id}

    The endpoint updates a single entity record.

    Body parameter

    {
      "name": "Red Sun",
      "users": [
        {
          "id": 19,
          "name": "Artist 1",
          "type": "HumanUser"
        },
        {
          "id": 18,
          "name": "Artist 2",
          "type": "HumanUser"
        }
      ]
    }
    

    Parameters

    Parameter In Type Required Description
    entity path string true The name of the entity type to interact with. The entity name should be passed in its plural snake_case form. Ex: CustomNonProjectEntity01 would be custom_non_project_entity_01s.
    record_id path integer true Id of the record to update.
    body body CreateOrUpdateRequest true The body should contain the key value pairs for the fields you want to set.
    » additionalProperties body string false Each key is the name of a field in the Shotgun database.

    Example responses

    200 undefined

    {
      "data": {
        "type": "Project",
        "attributes": {
          "tank_name": null,
          "end_date": null,
          "duration": null,
          "tracking_settings": {
            "navchains": {
              "Asset": "Asset.sg_asset_type",
              "Shot": "Shot.sg_sequence",
              "Cut": "Cut.entity",
              "CutItem": "CutItem.cut.entity"
            }
          },
          "color": "129,183,255",
          "client_site_settings_saved": false,
          "last_accessed_by_current_user": null,
          "code": null,
          "start_date": null,
          "sg_status": null,
          "cached_display_name": "Film Template",
          "billboard": null,
          "sg_description": null,
          "filmstrip_image": null,
          "is_template": true,
          "created_at": "2016-03-11T01:54:00Z",
          "updated_at": "2018-02-28T22:46:35Z",
          "sg_type": "Feature",
          "image": null,
          "landing_page_url": "/page/project_overview?project_id=82",
          "archived": false,
          "is_demo": false,
          "current_user_favorite": false,
          "name": "Film Template"
        },
        "relationships": {
          "users": {
            "data": [
              {
                "id": 19,
                "name": "Artist 1",
                "type": "HumanUser"
              },
              {
                "id": 18,
                "name": "Artist 2",
                "type": "HumanUser"
              },
              {
                "id": 66,
                "name": "Manager 1",
                "type": "HumanUser"
              }
            ],
            "links": {
              "self": "/api/v1/entity/projects/82/relationships/users"
            }
          },
          "layout_project": {
            "data": {
              "id": 70,
              "name": "Demo: Animation",
              "type": "Project"
            },
            "links": {
              "self": "/api/v1/entity/projects/82/relationships/layout_project",
              "related": "/api/v1/entity/projects/70"
            }
          },
          "phases": {
            "data": [],
            "links": {
              "self": "/api/v1/entity/projects/82/relationships/phases"
            }
          },
          "created_by": {
            "data": {
              "id": 24,
              "name": "Shotgun Support",
              "type": "HumanUser"
            },
            "links": {
              "self": "/api/v1/entity/projects/82/relationships/created_by",
              "related": "/api/v1/entity/human_users/24"
            }
          },
          "updated_by": {
            "data": {
              "id": 24,
              "name": "Shotgun Support",
              "type": "HumanUser"
            },
            "links": {
              "self": "/api/v1/entity/projects/82/relationships/updated_by",
              "related": "/api/v1/entity/human_users/24"
            }
          },
          "tags": {
            "data": [],
            "links": {
              "self": "/api/v1/entity/projects/82/relationships/tags"
            }
          },
          "task_templates": {
            "data": [],
            "links": {
              "self": "/api/v1/entity/projects/82/relationships/task_templates"
            }
          }
        },
        "id": 82
      },
      "links": {
        "self": "/api/v1/entity/projects/82"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Record has been updated. SingleRecordResponse
    401 Unauthorized Request rejected due to invalid credentials. ErrorResponse

    Delete a record

    Code samples

    # You can also use wget
    curl -X DELETE https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id} \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    DELETE https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id} HTTP/1.1
    Host: shotgun.mystudio.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}',
      method: 'delete',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}',
    {
      method: 'DELETE',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.delete 'https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.delete('https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("DELETE");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("DELETE", "https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    DELETE /entity/{entity}/{record_id}

    The endpoint deletes a single entity record.

    Parameters

    Parameter In Type Required Description
    entity path string true The name of the entity type to interact with. The entity name should be passed in its plural snake_case form. Ex: CustomNonProjectEntity01 would be custom_non_project_entity_01s.
    record_id path integer true Id of the record to delete.

    Example responses

    401 undefined

    {
      "errors": [
        {
          "id": "a4c9279479129dcd4413145f1fcdbd78",
          "status": 400,
          "code": 103,
          "title": "Request Parameters invalid.",
          "source": {
            "entity": [
              "entity is not valid"
            ]
          },
          "detail": null,
          "meta": null
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    204 No Content Record has been deleted. None
    401 Unauthorized Request rejected due to invalid credentials. ErrorResponse

    Revive a record

    Code samples

    # You can also use wget
    curl -X POST https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}?revive=true \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    POST https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}?revive=true HTTP/1.1
    Host: shotgun.mystudio.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}',
      method: 'post',
      data: '?revive=true',
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}?revive=true',
    {
      method: 'POST',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.post 'https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}',
      params: {
      'revive' => 'boolean'
    }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.post('https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}', params={
      'revive': 'true'
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}?revive=true");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("POST");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /entity/{entity}/{record_id}

    The endpoint revives a single entity record.

    Parameters

    Parameter In Type Required Description
    entity path string true The name of the entity type to interact with. The entity name should be passed in its plural snake_case form. Ex: CustomNonProjectEntity01 would be custom_non_project_entity_01s.
    record_id path integer true Id of the record to revive.
    revive query boolean true Revive flag. Should be set to 1 or true.

    Example responses

    200 undefined

    {
      "data": {
        "id": 82,
        "type": "Project",
        "attributes": {
          "name": "Demo Project"
        },
        "relationships": {
          "users": [
            {
              "id": 19,
              "name": "Artist 1",
              "type": "HumanUser"
            },
            {
              "id": 18,
              "name": "Artist 2",
              "type": "HumanUser"
            }
          ],
          "created_by": {
            "id": 24,
            "name": "Shotgun Support",
            "type": "HumanUser"
          }
        },
        "links": {
          "self": "/api/v1/projects/82"
        }
      },
      "links": {
        "self": "/api/v1/projects/82"
      },
      "meta": {
        "did_revive": true
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Record has been revived. Inline
    401 Unauthorized Request rejected due to invalid credentials. ErrorResponse

    Response Schema

    Status Code 200

    Name Type Required Description
    » data Record false No description
    »» id integer false Id of Entity
    »» type string false Entity Type
    »» attributes object false A hash of any record attributes requested.
    »» relationships object false A hash of any record relationships requested.
    »» links SelfLink false No description
    »»» self string false Link to the record.
    »» links SelfLink false No description
    »» meta object false No description
    »»» did_revive boolean false No description

    Read record relationship

    Code samples

    # You can also use wget
    curl -X GET https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/relationships/{related_field} \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    GET https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/relationships/{related_field} HTTP/1.1
    Host: shotgun.mystudio.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/relationships/{related_field}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/relationships/{related_field}',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.get 'https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/relationships/{related_field}',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.get('https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/relationships/{related_field}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/relationships/{related_field}");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/relationships/{related_field}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /entity/{entity}/{record_id}/relationships/{related_field}

    The endpoint provides access to records related to the current entity record via the a Entity or Multi-Entity field.

    Parameters

    Parameter In Type Required Description
    entity path string true The name of the entity type to interact with. The entity name should be passed in its plural snake_case form. Ex: CustomNonProjectEntity01 would be custom_non_project_entity_01s.
    record_id path integer true Id of the record to retrieve relationships from.
    related_field path integer true Related column name
    options query OptionsParameter false Optional settings for the request. Hash of different configuration options. Ex. options[return_only]=retired

    Example responses

    200 undefined

    {
      "data": {
        "timestamp": "2018-04-16T21:42:13Z",
        "upload_type": "Thumbanil",
        "upload_id": null,
        "storage_service": "sg",
        "original_filename": "logo.png",
        "multipart_upload": false
      },
      "links": {
        "upload": "/api/v1/entity/projects/86/image/_upload?filename=logo.png&signature=OaHsK%2BrkZk5w1GxgxI3aNmJ0H3Y%3D",
        "complete_upload": "/api/v1/entity/projects/86/image/_upload"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Record relationships have been retrieved. UploadInfoResponse
    401 Unauthorized Request rejected due to invalid credentials. ErrorResponse
    404 Not Found Record does not exist. ErrorResponse

    Read the thread contents for a Note

    Code samples

    # You can also use wget
    curl -X GET https://yoursite.shotgunstudio.com/api/v1/entity/notes/{record_id}/thread_contents \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    GET https://yoursite.shotgunstudio.com/api/v1/entity/notes/{record_id}/thread_contents HTTP/1.1
    Host: shotgun.mystudio.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://yoursite.shotgunstudio.com/api/v1/entity/notes/{record_id}/thread_contents',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://yoursite.shotgunstudio.com/api/v1/entity/notes/{record_id}/thread_contents',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.get 'https://yoursite.shotgunstudio.com/api/v1/entity/notes/{record_id}/thread_contents',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.get('https://yoursite.shotgunstudio.com/api/v1/entity/notes/{record_id}/thread_contents', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://yoursite.shotgunstudio.com/api/v1/entity/notes/{record_id}/thread_contents");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://yoursite.shotgunstudio.com/api/v1/entity/notes/{record_id}/thread_contents", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /entity/notes/{record_id}/thread_contents

    The endpoint provides access to the thread content of an entity. Currently only Note is supported

    Parameters

    Parameter In Type Required Description
    record_id path integer true Id of the record to retrieve thread contents from.
    entity_fields query EntityFieldsParameter false Optional settings for the request. Hash of specific fields to retrieve for different entity types. If * is specified in the fields, all fields will be returned.

    Example responses

    200 undefined

    {
      "data": [
        {
          "type": "Note",
          "id": 1,
          "content": "Hello, this is my note",
          "created_at": "2006-04-10T14:19:57Z",
          "created_by": null
        },
        {
          "type": "Reply",
          "id": 1,
          "content": "admin reply",
          "user": {
            "id": 8,
            "name": "Admin User",
            "type": "HumanUser",
            "image": null
          },
          "created_at": "2007-04-10T14:19:57Z"
        }
      ],
      "links": {
        "self": "/api/v1/entity/notes/1/thread_contents"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Thread contents of an entity. EntityThreadContentsResponse
    401 Unauthorized Request rejected due to invalid credentials. ErrorResponse
    404 Not Found Record does not exist. ErrorResponse

    Update the last accessed time

    Code samples

    # You can also use wget
    curl -X PUT https://yoursite.shotgunstudio.com/api/v1/entity/projects/{record_id}/_update_last_accessed \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    PUT https://yoursite.shotgunstudio.com/api/v1/entity/projects/{record_id}/_update_last_accessed HTTP/1.1
    Host: shotgun.mystudio.com
    Content-Type: application/json
    Accept: application/json
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://yoursite.shotgunstudio.com/api/v1/entity/projects/{record_id}/_update_last_accessed',
      method: 'put',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    const inputBody = '{
      "user_id": 0
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://yoursite.shotgunstudio.com/api/v1/entity/projects/{record_id}/_update_last_accessed',
    {
      method: 'PUT',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.put 'https://yoursite.shotgunstudio.com/api/v1/entity/projects/{record_id}/_update_last_accessed',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.put('https://yoursite.shotgunstudio.com/api/v1/entity/projects/{record_id}/_update_last_accessed', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://yoursite.shotgunstudio.com/api/v1/entity/projects/{record_id}/_update_last_accessed");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("PUT");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json"},
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("PUT", "https://yoursite.shotgunstudio.com/api/v1/entity/projects/{record_id}/_update_last_accessed", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    PUT /entity/projects/{record_id}/_update_last_accessed

    The endpoint updates the last access time of a project by a user

    Body parameter

    {
      "user_id": 0
    }
    

    Parameters

    Parameter In Type Required Description
    record_id path integer true Id of the record to retrieve thread contents from.
    body body object true The body should contain the user id to the last accessed user.
    » user_id body integer true The id of the user to set the last accessed to.

    Example responses

    200 undefined

    {
      "data": {
        "id": 82,
        "type": "Project"
      },
      "links": {
        "self": "/api/v1/projects/82"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Thread contents of an entity. Inline
    401 Unauthorized Request rejected due to invalid credentials. ErrorResponse
    404 Not Found Record does not exist. ErrorResponse

    Response Schema

    Status Code 200

    Name Type Required Description
    » data object false No description
    »» id integer false Id of Entity
    »» type string false Entity Type
    » links SelfLink false No description
    »» self string false Link to the record.

    Read entity activity stream

    Code samples

    # You can also use wget
    curl -X GET https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/activity_stream \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    GET https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/activity_stream HTTP/1.1
    Host: shotgun.mystudio.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/activity_stream',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/activity_stream',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.get 'https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/activity_stream',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.get('https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/activity_stream', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/activity_stream");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/activity_stream", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /entity/{entity}/{record_id}/activity_stream

    The endpoint provides access to the activity stream of an entity.

    Parameters

    Parameter In Type Required Description
    entity path string true The name of the entity type to interact with. The entity name should be passed in its plural snake_case form. Ex: CustomNonProjectEntity01 would be custom_non_project_entity_01s.
    record_id path integer true Id of the record to retrieve activity stream from.
    min_id query integer false The lowest stream id to fetch. If min_id is not set, no limit is set, but the number of records returned are instead limited by the limit parameter. If min_id is set to a particular stream id, it will never fetch records with and id lower than the given value. This is useful if you already have stream data cached locally and just want to 'top up' with the latest data. Note however, that it is not guaranteed that this endpoint will returns all the records down from max_id to min_id - if the span is greater than the number of items specified by the limit parameter, only a subset is returned.
    max_id query integer false The highest stream id to fetch. If max_id is not set, this endpoint will start fetching at the highest available stream id
    limit query integer false Number of records to return. If this is not provided it defaults to 25 which is the same as the web application activity stream. The limit will be capped at a maximum of 500.
    entity_fields query EntityFieldsParameter false Optional settings for the request. Hash of specific fields to retrieve for different entity types. If * is specified in the fields, all fields will be returned.

    Example responses

    200 undefined

    {
      "data": {
        "entity_type": "Shot",
        "entity_id": 5,
        "latest_update_id": 9,
        "earliest_update_id": 0,
        "updates": [
          {
            "id": 9,
            "update_type": "update",
            "meta": {
              "type": "attribute_change",
              "attribute_name": "sg_status_list",
              "entity_type": "Shot",
              "entity_id": 5,
              "field_data_type": "status_list",
              "old_value": null,
              "new_value": "act"
            },
            "created_at": "2018-05-30T04:57:24Z",
            "read": false,
            "primary_entity": {
              "type": "Shot",
              "id": 5,
              "name": "shot 5",
              "status": "act"
            },
            "created_by": {
              "type": "ApiUser",
              "id": 10,
              "name": "A api user",
              "status": "act",
              "image": null
            }
          }
        ]
      },
      "links": {
        "self": "/api/v1/entity/shots/5/activity_stream"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Activity stream of an entity. EntityActivityStreamResponse
    401 Unauthorized Request rejected due to invalid credentials. ErrorResponse
    404 Not Found Record does not exist. ErrorResponse

    Read user follows

    Code samples

    # You can also use wget
    curl -X GET https://yoursite.shotgunstudio.com/api/v1/entity/human_users/{user_id}/following \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    GET https://yoursite.shotgunstudio.com/api/v1/entity/human_users/{user_id}/following HTTP/1.1
    Host: shotgun.mystudio.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://yoursite.shotgunstudio.com/api/v1/entity/human_users/{user_id}/following',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://yoursite.shotgunstudio.com/api/v1/entity/human_users/{user_id}/following',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.get 'https://yoursite.shotgunstudio.com/api/v1/entity/human_users/{user_id}/following',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.get('https://yoursite.shotgunstudio.com/api/v1/entity/human_users/{user_id}/following', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://yoursite.shotgunstudio.com/api/v1/entity/human_users/{user_id}/following");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://yoursite.shotgunstudio.com/api/v1/entity/human_users/{user_id}/following", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /entity/human_users/{user_id}/following

    The endpoint provides access to the list of entities a user follows. Entity type and Project Id can be used to filter what types of follow entries are retrieved.

    Parameters

    Parameter In Type Required Description
    user_id path integer true Id of the user to retrieve follow information from.
    entity query string false The name of the entity type to interact with. The entity name should be passed in its plural snake_case form. Ex: CustomNonProjectEntity01 would be custom_non_project_entity_01s.
    project_id query integer false The id of the project to use for the schema query.

    Example responses

    200 undefined

    {
      "data": [
        {
          "id": 82,
          "type": "Task",
          "links": {
            "self": "/api/v1/projects/82"
          }
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    200 OK User's follows have been retrieved. Inline
    401 Unauthorized Request rejected due to invalid credentials. ErrorResponse
    404 Not Found Record does not exist. ErrorResponse

    Response Schema

    Status Code 200

    Name Type Required Description
    » data [FollowRecord] false No description
    »» id integer false Entity Id
    »» type string false Entity Type
    »» links SelfLink false No description
    »»» self string false Link to the record.

    Read entity followers

    Code samples

    # You can also use wget
    curl -X GET https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/followers \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    GET https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/followers HTTP/1.1
    Host: shotgun.mystudio.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/followers',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/followers',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.get 'https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/followers',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.get('https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/followers', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/followers");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/followers", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /entity/{entity}/{record_id}/followers

    The endpoint provides access to the list of users that follow an entity.

    Parameters

    Parameter In Type Required Description
    entity path string true The name of the entity type to interact with. The entity name should be passed in its plural snake_case form. Ex: CustomNonProjectEntity01 would be custom_non_project_entity_01s.
    record_id path integer true Id of the entity to retrieve followers from.

    Example responses

    200 undefined

    {
      "data": [
        {
          "id": 5,
          "type": "HumanUser",
          "attributes": {
            "name": "Artist 1"
          },
          "links": {
            "self": "/api/v1/entity/human_users/5"
          }
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Entity's followers have been retrieved. Inline
    401 Unauthorized Request rejected due to invalid credentials. ErrorResponse
    404 Not Found Record does not exist. ErrorResponse

    Response Schema

    Status Code 200

    Name Type Required Description
    » data [FollowerRecord] false No description
    »» id integer false Entity Id
    »» type string false Entity Type
    »» attributes object false A hash of additional follow data
    »»» name string false Entity name
    »» links SelfLink false No description
    »»» self string false Link to the record.

    Follow an entity

    Code samples

    # You can also use wget
    curl -X POST https://yoursite.shotgunstudio.com/api/v1/entity/human_users/{user_id}/follow \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    POST https://yoursite.shotgunstudio.com/api/v1/entity/human_users/{user_id}/follow HTTP/1.1
    Host: shotgun.mystudio.com
    Content-Type: application/json
    Accept: application/json
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://yoursite.shotgunstudio.com/api/v1/entity/human_users/{user_id}/follow',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    const inputBody = '{
      "entities": [
        {
          "record_id": 5,
          "entity": "Task"
        }
      ]
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://yoursite.shotgunstudio.com/api/v1/entity/human_users/{user_id}/follow',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.post 'https://yoursite.shotgunstudio.com/api/v1/entity/human_users/{user_id}/follow',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.post('https://yoursite.shotgunstudio.com/api/v1/entity/human_users/{user_id}/follow', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://yoursite.shotgunstudio.com/api/v1/entity/human_users/{user_id}/follow");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("POST");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json"},
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://yoursite.shotgunstudio.com/api/v1/entity/human_users/{user_id}/follow", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /entity/human_users/{user_id}/follow

    The endpoint allows a user to follow entities.

    Body parameter

    {
      "entities": [
        {
          "record_id": 5,
          "entity": "Task"
        }
      ]
    }
    

    Parameters

    Parameter In Type Required Description
    user_id path integer true Id of the user to retrieve follow information from.
    body body object true No description
    » entities body [EntityIdentifier] false Array of entities
    »» record_id body integer false Entity Id
    »» entity body string false Entity Type

    Example responses

    401 undefined

    {
      "errors": [
        {
          "id": "a4c9279479129dcd4413145f1fcdbd78",
          "status": 400,
          "code": 103,
          "title": "Request Parameters invalid.",
          "source": {
            "entity": [
              "entity is not valid"
            ]
          },
          "detail": null,
          "meta": null
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    204 No Content Entity has been followed by the given HumanUser None
    401 Unauthorized Request rejected due to invalid credentials. ErrorResponse
    404 Not Found Record does not exist. ErrorResponse

    Unfollow an entity

    Code samples

    # You can also use wget
    curl -X PUT https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/unfollow \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    PUT https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/unfollow HTTP/1.1
    Host: shotgun.mystudio.com
    Content-Type: application/json
    Accept: application/json
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/unfollow',
      method: 'put',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    const inputBody = '{
      "user_id": 5
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/unfollow',
    {
      method: 'PUT',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.put 'https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/unfollow',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.put('https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/unfollow', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/unfollow");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("PUT");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json"},
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("PUT", "https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/unfollow", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    PUT /entity/{entity}/{record_id}/unfollow

    The endpoint allows a user to unfollow an entity.

    Body parameter

    {
      "user_id": 5
    }
    

    Parameters

    Parameter In Type Required Description
    entity path string true The name of the entity type to interact with. The entity name should be passed in its plural snake_case form. Ex: CustomNonProjectEntity01 would be custom_non_project_entity_01s.
    record_id path integer true Id of the entity to unfollow.
    body body object true No description
    » user_id body integer false Id of the user who will unfollow the entity

    Example responses

    401 undefined

    {
      "errors": [
        {
          "id": "a4c9279479129dcd4413145f1fcdbd78",
          "status": 400,
          "code": 103,
          "title": "Request Parameters invalid.",
          "source": {
            "entity": [
              "entity is not valid"
            ]
          },
          "detail": null,
          "meta": null
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    204 No Content User successfully unfollowed the entity None
    401 Unauthorized Request rejected due to invalid credentials. ErrorResponse
    404 Not Found Record does not exist. ErrorResponse

    Access Hierarchy Data

    Endpoints to allow the navigation through an entity hierarchy across projects.

    Hierarchy Expand

    Code samples

    # You can also use wget
    curl -X POST https://yoursite.shotgunstudio.com/api/v1/hierarchy/_expand \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    POST https://yoursite.shotgunstudio.com/api/v1/hierarchy/_expand HTTP/1.1
    Host: shotgun.mystudio.com
    Content-Type: application/json
    Accept: application/json
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://yoursite.shotgunstudio.com/api/v1/hierarchy/_expand',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    const inputBody = '{
      "entity_fields": [
        {
          "entity": "string",
          "fields": [
            "string"
          ]
        }
      ],
      "path": "string",
      "seed_entity_field": "string"
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://yoursite.shotgunstudio.com/api/v1/hierarchy/_expand',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.post 'https://yoursite.shotgunstudio.com/api/v1/hierarchy/_expand',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.post('https://yoursite.shotgunstudio.com/api/v1/hierarchy/_expand', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://yoursite.shotgunstudio.com/api/v1/hierarchy/_expand");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("POST");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json"},
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://yoursite.shotgunstudio.com/api/v1/hierarchy/_expand", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /hierarchy/_expand

    Allows to navigate through an entity hierarchy across projects.

    Body parameter

    {
      "entity_fields": [
        {
          "entity": "string",
          "fields": [
            "string"
          ]
        }
      ],
      "path": "string",
      "seed_entity_field": "string"
    }
    

    Parameters

    Parameter In Type Required Description
    body body HierarchyExpandRequest true No description
    » entity_fields body [object] false Indicates which fields to be returned when an entity is returned in the payload.
    »» entity body string false The entity to be returned.
    »» fields body [string] false An array of fields to be returned.
    » path body string true It provides the target navigation level and is composed of all information to get there.
    » seed_entity_field body string false Indicates the schema to be used for the provided path. This seed is expected to be an 'entity' field.

    Example responses

    200 undefined

    {
      "data": {
        "label": "string",
        "ref": {
          "kind": "string",
          "value": {
            "type": "string",
            "id": 0
          }
        },
        "parent_path": "string",
        "path": "string",
        "target_entities": {
          "type": "string",
          "additional_filter_presets": [
            {
              "preset_name": "string",
              "path": "string",
              "seed": {
                "type": "string",
                "field": "string"
              }
            }
          ]
        },
        "has_children": true,
        "children": [
          null
        ]
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK The returned payload provides a navigation tree across projects. HierarchyExpandResponse
    401 Unauthorized Request rejected due to invalid credentials. ErrorResponse

    Code samples

    # You can also use wget
    curl -X POST https://yoursite.shotgunstudio.com/api/v1/hierarchy/_search \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    POST https://yoursite.shotgunstudio.com/api/v1/hierarchy/_search HTTP/1.1
    Host: shotgun.mystudio.com
    Content-Type: application/json
    Accept: application/json
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://yoursite.shotgunstudio.com/api/v1/hierarchy/_search',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    const inputBody = '{
      "root_path": "string",
      "search_criteria": {
        "search_string": "string",
        "entity": {
          "type": "string",
          "id": 0
        }
      },
      "seed_entity_field": "string"
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://yoursite.shotgunstudio.com/api/v1/hierarchy/_search',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.post 'https://yoursite.shotgunstudio.com/api/v1/hierarchy/_search',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.post('https://yoursite.shotgunstudio.com/api/v1/hierarchy/_search', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://yoursite.shotgunstudio.com/api/v1/hierarchy/_search");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("POST");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json"},
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://yoursite.shotgunstudio.com/api/v1/hierarchy/_search", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /hierarchy/_search

    Allows to find all entities that correspond to a given search string, or given entity ref, inside the given project.

    Body parameter

    {
      "root_path": "string",
      "search_criteria": {
        "search_string": "string",
        "entity": {
          "type": "string",
          "id": 0
        }
      },
      "seed_entity_field": "string"
    }
    

    Parameters

    Parameter In Type Required Description
    body body HierarchySearchRequest true No description
    » root_path body string false Path from which the search should start. If not specified, all projects are searched.
    » search_criteria body object true This object must contain only one of the properties below.
    »» search_string body string false String used to search the name of all entities.
    »» entity body object false Entity reference used to filter entities.
    »»» type body string true The type of the corresponding entity.
    »»» id body integer true The id of the corresponding entity.
    »» seed_entity_field body string false Indicates the schema to use for the provided path. This seed is expected to be an 'entity' field.

    Example responses

    200 undefined

    {
      "data": [
        {
          "label": "string",
          "incremental_path": [
            "string"
          ],
          "path_label": "string",
          "ref": {
            "id": 0,
            "type": "string"
          },
          "project_id": 0
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    200 OK The returned payload provides the user facing 'tree label' to use as well as the sequence of paths to use with the 'expand' function to get to the entities found. HierarchySearchResponse
    401 Unauthorized Request rejected due to invalid credentials. ErrorResponse

    Access Preferences

    The preferences endpoint gives you access to some of the preferences of your Shotgun site.

    Read preferences

    Code samples

    # You can also use wget
    curl -X GET https://yoursite.shotgunstudio.com/api/v1/preferences \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    GET https://yoursite.shotgunstudio.com/api/v1/preferences HTTP/1.1
    Host: shotgun.mystudio.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://yoursite.shotgunstudio.com/api/v1/preferences',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://yoursite.shotgunstudio.com/api/v1/preferences',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.get 'https://yoursite.shotgunstudio.com/api/v1/preferences',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.get('https://yoursite.shotgunstudio.com/api/v1/preferences', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://yoursite.shotgunstudio.com/api/v1/preferences");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://yoursite.shotgunstudio.com/api/v1/preferences", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /preferences

    Returns the values of a subset of site preferences.

    Parameters

    Parameter In Type Required Description
    prefs query string false A comma separated list of preferences to return.

    Example responses

    200 undefined

    {}
    

    401 undefined

    {
      "errors": [
        {
          "id": "a4c9279479129dcd4413145f1fcdbd78",
          "status": 400,
          "code": 103,
          "title": "Request Parameters invalid.",
          "source": {
            "entity": [
              "entity is not valid"
            ]
          },
          "detail": null,
          "meta": null
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Preferences have been retrieved. Inline
    401 Unauthorized Request rejected due to invalid credentials. ErrorResponse

    Response Schema

    Status Code 200

    Name Type Required Description
    » test string false No description

    Access Schema data

    The schema endpoints give you the ability to introspect the schema of your Shotgun site.

    Update the properties of a field on an entity

    Code samples

    # You can also use wget
    curl -X PUT https://yoursite.shotgunstudio.com/api/v1/auth/access_token \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    PUT https://yoursite.shotgunstudio.com/api/v1/auth/access_token HTTP/1.1
    Host: shotgun.mystudio.com
    Content-Type: application/json
    Accept: application/json
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://yoursite.shotgunstudio.com/api/v1/auth/access_token',
      method: 'put',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    const inputBody = '{
      "properties": [
        {
          "property_name": "string",
          "value": "string"
        }
      ]
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://yoursite.shotgunstudio.com/api/v1/auth/access_token',
    {
      method: 'PUT',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.put 'https://yoursite.shotgunstudio.com/api/v1/auth/access_token',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.put('https://yoursite.shotgunstudio.com/api/v1/auth/access_token', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://yoursite.shotgunstudio.com/api/v1/auth/access_token");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("PUT");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json"},
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("PUT", "https://yoursite.shotgunstudio.com/api/v1/auth/access_token", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    PUT /auth/access_token

    Updates the properties of a field on an entity

    Body parameter

    {
      "properties": [
        {
          "property_name": "string",
          "value": "string"
        }
      ]
    }
    

    Parameters

    Parameter In Type Required Description
    entity path string true The name of the entity type to interact with. The entity name should be passed in its plural snake_case form. Ex: CustomNonProjectEntity01 would be custom_non_project_entity_01s.
    field_name path string true The field on the entity.
    body body UpdateFieldRequest true The body should contain the properties of the field to be updated.
    » properties body [CreateUpdateFieldProperty] true The properties to set for the field.
    »» property_name body string true The name of the property.
    »» value body string true The value of the property

    Example responses

    200 undefined

    {
      "data": {
        "name": {
          "value": "Billboard",
          "editable": true
        },
        "description": {
          "value": "",
          "editable": true
        },
        "entity_type": {
          "value": "Project",
          "editable": false
        },
        "data_type": {
          "value": "url",
          "editable": false
        },
        "editable": {
          "value": true,
          "editable": false
        },
        "mandatory": {
          "value": false,
          "editable": false
        },
        "unique": {
          "value": false,
          "editable": false
        },
        "properties": {
          "default_value": {
            "value": null,
            "editable": false
          },
          "summary_default": {
            "value": "none",
            "editable": false
          },
          "open_in_new_window": {
            "value": true,
            "editable": false
          }
        },
        "visible": {
          "value": true,
          "editable": false
        },
        "ui_value_displayable": {
          "value": true,
          "editable": false
        }
      },
      "links": {
        "self": "/api/v1/schema/projects/fields/billboard"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Schema field for entity successfully retrieved. SchemaFieldResponse
    401 Unauthorized Request rejected due to invalid credentials. ErrorResponse

    Read schema for all entities

    Code samples

    # You can also use wget
    curl -X GET https://yoursite.shotgunstudio.com/api/v1/schema \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    GET https://yoursite.shotgunstudio.com/api/v1/schema HTTP/1.1
    Host: shotgun.mystudio.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://yoursite.shotgunstudio.com/api/v1/schema',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://yoursite.shotgunstudio.com/api/v1/schema',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.get 'https://yoursite.shotgunstudio.com/api/v1/schema',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.get('https://yoursite.shotgunstudio.com/api/v1/schema', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://yoursite.shotgunstudio.com/api/v1/schema");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://yoursite.shotgunstudio.com/api/v1/schema", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /schema

    Returns schema information about all entities for the site.

    Parameters

    Parameter In Type Required Description
    project_id query integer false The id of the project to use for the schema query.

    Example responses

    200 undefined

    {
      "data": [
        {
          "ActionMenuItem": {
            "name": {
              "value": "Action Menu Item",
              "editable": false
            },
            "visible": {
              "value": true,
              "editable": false
            }
          },
          "ApiUser": {
            "name": {
              "value": "Script",
              "editable": false
            },
            "visible": {
              "value": true,
              "editable": false
            }
          },
          "ApiUserProjectConnection": {
            "name": {
              "value": "Api User Project Connection",
              "editable": false
            },
            "visible": {
              "value": true,
              "editable": false
            }
          },
          "AppWelcomeUserConnection": {
            "name": {
              "value": "App Welcome User Connection",
              "editable": false
            },
            "visible": {
              "value": true,
              "editable": false
            }
          },
          "Asset": {
            "name": {
              "value": "Asset",
              "editable": false
            },
            "visible": {
              "value": true,
              "editable": false
            }
          }
        }
      ],
      "links": {
        "self": "/api/v1/schema"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK All entity schemas successfully retrieved. SchemaEntitiesResponse
    401 Unauthorized Request rejected due to invalid credentials. ErrorResponse

    Read schema for a single entity

    Code samples

    # You can also use wget
    curl -X GET https://yoursite.shotgunstudio.com/api/v1/schema/{entity} \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    GET https://yoursite.shotgunstudio.com/api/v1/schema/{entity} HTTP/1.1
    Host: shotgun.mystudio.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://yoursite.shotgunstudio.com/api/v1/schema/{entity}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://yoursite.shotgunstudio.com/api/v1/schema/{entity}',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.get 'https://yoursite.shotgunstudio.com/api/v1/schema/{entity}',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.get('https://yoursite.shotgunstudio.com/api/v1/schema/{entity}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://yoursite.shotgunstudio.com/api/v1/schema/{entity}");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://yoursite.shotgunstudio.com/api/v1/schema/{entity}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /schema/{entity}

    Returns schema information about the given entity.

    Parameters

    Parameter In Type Required Description
    entity path string true The name of the entity type to interact with. The entity name should be passed in its snake_case form. Ex: CustomNonProjectEntity01 would be custom_non_project_entity_01.
    project_id query integer false The id of the project to use for the schema query.

    Example responses

    200 undefined

    {
      "data": {
        "name": {
          "value": "Project",
          "editable": false
        },
        "visible": {
          "value": true,
          "editable": false
        }
      },
      "links": {
        "self": "/api/v1/schema/projects"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Entity schema successfully retrieved. SchemaEntityResponse
    401 Unauthorized Request rejected due to invalid credentials. ErrorResponse

    Read all field schemas for an entity

    Code samples

    # You can also use wget
    curl -X GET https://yoursite.shotgunstudio.com/api/v1/schema/{entity}/fields \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    GET https://yoursite.shotgunstudio.com/api/v1/schema/{entity}/fields HTTP/1.1
    Host: shotgun.mystudio.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://yoursite.shotgunstudio.com/api/v1/schema/{entity}/fields',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://yoursite.shotgunstudio.com/api/v1/schema/{entity}/fields',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.get 'https://yoursite.shotgunstudio.com/api/v1/schema/{entity}/fields',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.get('https://yoursite.shotgunstudio.com/api/v1/schema/{entity}/fields', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://yoursite.shotgunstudio.com/api/v1/schema/{entity}/fields");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://yoursite.shotgunstudio.com/api/v1/schema/{entity}/fields", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /schema/{entity}/fields

    Returns all schema field information for a given entity.

    Parameters

    Parameter In Type Required Description
    entity path string true The name of the entity type to interact with. The entity name should be passed in its snake_case form. Ex: CustomNonProjectEntity01 would be custom_non_project_entity_01.
    project_id query integer false The id of the project to use for the schema query.

    Example responses

    200 undefined

    {
      "data": {
        "tank_name": {
          "name": {
            "value": "Tank Name",
            "editable": true
          },
          "description": {
            "value": "",
            "editable": true
          },
          "entity_type": {
            "value": "Project",
            "editable": false
          },
          "data_type": {
            "value": "text",
            "editable": false
          },
          "editable": {
            "value": true,
            "editable": false
          },
          "mandatory": {
            "value": false,
            "editable": false
          },
          "unique": {
            "value": false,
            "editable": false
          },
          "properties": {
            "default_value": {
              "value": null,
              "editable": false
            },
            "summary_default": {
              "value": "none",
              "editable": true
            },
            "regex_validation": {
              "value": "",
              "editable": true
            },
            "regex_validation_enabled": {
              "value": null,
              "editable": true
            }
          },
          "visible": {
            "value": true,
            "editable": false
          },
          "ui_value_displayable": {
            "value": true,
            "editable": false
          }
        },
        "end_date": {
          "name": {
            "value": "End Date",
            "editable": true
          },
          "description": {
            "value": "",
            "editable": true
          },
          "entity_type": {
            "value": "Project",
            "editable": false
          },
          "data_type": {
            "value": "date",
            "editable": false
          },
          "editable": {
            "value": false,
            "editable": false
          },
          "mandatory": {
            "value": false,
            "editable": false
          },
          "unique": {
            "value": false,
            "editable": false
          },
          "properties": {
            "default_value": {
              "value": null,
              "editable": false
            },
            "summary_default": {
              "value": "none",
              "editable": true
            }
          },
          "visible": {
            "value": true,
            "editable": false
          },
          "ui_value_displayable": {
            "value": true,
            "editable": false
          }
        }
      },
      "links": {
        "self": "/api/v1/schema/project/fields"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK All schema fields for entity successfully retrieved. SchemaFieldsResponse
    401 Unauthorized Request rejected due to invalid credentials. ErrorResponse

    Create new field on entity

    Code samples

    # You can also use wget
    curl -X POST https://yoursite.shotgunstudio.com/api/v1/schema/{entity}/fields \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    POST https://yoursite.shotgunstudio.com/api/v1/schema/{entity}/fields HTTP/1.1
    Host: shotgun.mystudio.com
    Content-Type: application/json
    Accept: application/json
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://yoursite.shotgunstudio.com/api/v1/schema/{entity}/fields',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    const inputBody = '{
      "data_type": "checkbox",
      "properties": [
        {
          "property_name": "string",
          "value": "string"
        }
      ]
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://yoursite.shotgunstudio.com/api/v1/schema/{entity}/fields',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.post 'https://yoursite.shotgunstudio.com/api/v1/schema/{entity}/fields',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.post('https://yoursite.shotgunstudio.com/api/v1/schema/{entity}/fields', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://yoursite.shotgunstudio.com/api/v1/schema/{entity}/fields");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("POST");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json"},
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://yoursite.shotgunstudio.com/api/v1/schema/{entity}/fields", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /schema/{entity}/fields

    Creates a new field on the given entity

    Body parameter

    {
      "data_type": "checkbox",
      "properties": [
        {
          "property_name": "string",
          "value": "string"
        }
      ]
    }
    

    Parameters

    Parameter In Type Required Description
    entity path string true The name of the entity type to interact with. The entity name should be passed in its plural snake_case form. Ex: CustomNonProjectEntity01 would be custom_non_project_entity_01s.
    body body CreateFieldRequest true The body should contain the data_type and the properties of the field to be created.
    » data_type body string true The data type of the field to create.
    » properties body [CreateUpdateFieldProperty] true The properties to set for the field.
    »» property_name body string true The name of the property.
    »» value body string true The value of the property

    Enumerated Values

    Parameter Value
    » data_type checkbox
    » data_type currency
    » data_type date
    » data_type date_time
    » data_type duration
    » data_type entity
    » data_type float
    » data_type list
    » data_type multi_entity
    » data_type number
    » data_type percent
    » data_type status_list
    » data_type text
    » data_type timecode
    » data_type footage
    » data_type url
    » data_type uuid
    » data_type calculated

    Example responses

    201 undefined

    {
      "data": {
        "tank_name": {
          "name": {
            "value": "Tank Name",
            "editable": true
          },
          "description": {
            "value": "",
            "editable": true
          },
          "entity_type": {
            "value": "Project",
            "editable": false
          },
          "data_type": {
            "value": "text",
            "editable": false
          },
          "editable": {
            "value": true,
            "editable": false
          },
          "mandatory": {
            "value": false,
            "editable": false
          },
          "unique": {
            "value": false,
            "editable": false
          },
          "properties": {
            "default_value": {
              "value": null,
              "editable": false
            },
            "summary_default": {
              "value": "none",
              "editable": true
            },
            "regex_validation": {
              "value": "",
              "editable": true
            },
            "regex_validation_enabled": {
              "value": null,
              "editable": true
            }
          },
          "visible": {
            "value": true,
            "editable": false
          },
          "ui_value_displayable": {
            "value": true,
            "editable": false
          }
        },
        "end_date": {
          "name": {
            "value": "End Date",
            "editable": true
          },
          "description": {
            "value": "",
            "editable": true
          },
          "entity_type": {
            "value": "Project",
            "editable": false
          },
          "data_type": {
            "value": "date",
            "editable": false
          },
          "editable": {
            "value": false,
            "editable": false
          },
          "mandatory": {
            "value": false,
            "editable": false
          },
          "unique": {
            "value": false,
            "editable": false
          },
          "properties": {
            "default_value": {
              "value": null,
              "editable": false
            },
            "summary_default": {
              "value": "none",
              "editable": true
            }
          },
          "visible": {
            "value": true,
            "editable": false
          },
          "ui_value_displayable": {
            "value": true,
            "editable": false
          }
        }
      },
      "links": {
        "self": "/api/v1/schema/project/fields"
      }
    }
    

    Responses

    Status Meaning Description Schema
    201 Created Field successfully created SchemaFieldsResponse
    401 Unauthorized Request rejected due to invalid credentials. ErrorResponse

    Read one field schema for an entity

    Code samples

    # You can also use wget
    curl -X GET https://yoursite.shotgunstudio.com/api/v1/schema/{entity}/fields/{field_name} \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    GET https://yoursite.shotgunstudio.com/api/v1/schema/{entity}/fields/{field_name} HTTP/1.1
    Host: shotgun.mystudio.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://yoursite.shotgunstudio.com/api/v1/schema/{entity}/fields/{field_name}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://yoursite.shotgunstudio.com/api/v1/schema/{entity}/fields/{field_name}',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.get 'https://yoursite.shotgunstudio.com/api/v1/schema/{entity}/fields/{field_name}',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.get('https://yoursite.shotgunstudio.com/api/v1/schema/{entity}/fields/{field_name}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://yoursite.shotgunstudio.com/api/v1/schema/{entity}/fields/{field_name}");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://yoursite.shotgunstudio.com/api/v1/schema/{entity}/fields/{field_name}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /schema/{entity}/fields/{field_name}

    Returns schema information about a specific field on a given entity.

    Parameters

    Parameter In Type Required Description
    entity path string true The name of the entity type to interact with. The entity name should be passed in its snake_case form. Ex: CustomNonProjectEntity01 would be custom_non_project_entity_01.
    field_name path string true The field on the entity.
    project_id query integer false The id of the project to use for the schema query.

    Example responses

    200 undefined

    {
      "data": {
        "name": {
          "value": "Billboard",
          "editable": true
        },
        "description": {
          "value": "",
          "editable": true
        },
        "entity_type": {
          "value": "Project",
          "editable": false
        },
        "data_type": {
          "value": "url",
          "editable": false
        },
        "editable": {
          "value": true,
          "editable": false
        },
        "mandatory": {
          "value": false,
          "editable": false
        },
        "unique": {
          "value": false,
          "editable": false
        },
        "properties": {
          "default_value": {
            "value": null,
            "editable": false
          },
          "summary_default": {
            "value": "none",
            "editable": false
          },
          "open_in_new_window": {
            "value": true,
            "editable": false
          }
        },
        "visible": {
          "value": true,
          "editable": false
        },
        "ui_value_displayable": {
          "value": true,
          "editable": false
        }
      },
      "links": {
        "self": "/api/v1/schema/projects/fields/billboard"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Schema field for entity successfully retrieved. SchemaFieldResponse
    401 Unauthorized Request rejected due to invalid credentials. ErrorResponse

    Delete one field from an entity

    Code samples

    # You can also use wget
    curl -X DELETE https://yoursite.shotgunstudio.com/api/v1/schema/{entity}/fields/{field_name} \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    DELETE https://yoursite.shotgunstudio.com/api/v1/schema/{entity}/fields/{field_name} HTTP/1.1
    Host: shotgun.mystudio.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://yoursite.shotgunstudio.com/api/v1/schema/{entity}/fields/{field_name}',
      method: 'delete',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://yoursite.shotgunstudio.com/api/v1/schema/{entity}/fields/{field_name}',
    {
      method: 'DELETE',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.delete 'https://yoursite.shotgunstudio.com/api/v1/schema/{entity}/fields/{field_name}',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.delete('https://yoursite.shotgunstudio.com/api/v1/schema/{entity}/fields/{field_name}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://yoursite.shotgunstudio.com/api/v1/schema/{entity}/fields/{field_name}");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("DELETE");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("DELETE", "https://yoursite.shotgunstudio.com/api/v1/schema/{entity}/fields/{field_name}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    DELETE /schema/{entity}/fields/{field_name}

    Deletes one field from an entity in Shotgun.

    Parameters

    Parameter In Type Required Description
    entity path string true The name of the entity type to interact with. The entity name should be passed in its snake_case form. Ex: CustomNonProjectEntity01 would be custom_non_project_entity_01.
    field_name path string true The field on the entity.

    Example responses

    401 undefined

    {
      "errors": [
        {
          "id": "a4c9279479129dcd4413145f1fcdbd78",
          "status": 400,
          "code": 103,
          "title": "Request Parameters invalid.",
          "source": {
            "entity": [
              "entity is not valid"
            ]
          },
          "detail": null,
          "meta": null
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    204 No Content Field for entity successfully removed. None
    401 Unauthorized Request rejected due to invalid credentials. ErrorResponse

    Revive one field from an entity

    Code samples

    # You can also use wget
    curl -X POST https://yoursite.shotgunstudio.com/api/v1/schema/{entity}/fields/{field_name}?revive=true \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    POST https://yoursite.shotgunstudio.com/api/v1/schema/{entity}/fields/{field_name}?revive=true HTTP/1.1
    Host: shotgun.mystudio.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://yoursite.shotgunstudio.com/api/v1/schema/{entity}/fields/{field_name}',
      method: 'post',
      data: '?revive=true',
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://yoursite.shotgunstudio.com/api/v1/schema/{entity}/fields/{field_name}?revive=true',
    {
      method: 'POST',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.post 'https://yoursite.shotgunstudio.com/api/v1/schema/{entity}/fields/{field_name}',
      params: {
      'revive' => 'boolean'
    }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.post('https://yoursite.shotgunstudio.com/api/v1/schema/{entity}/fields/{field_name}', params={
      'revive': 'true'
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://yoursite.shotgunstudio.com/api/v1/schema/{entity}/fields/{field_name}?revive=true");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("POST");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://yoursite.shotgunstudio.com/api/v1/schema/{entity}/fields/{field_name}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /schema/{entity}/fields/{field_name}

    Revive one field from an entity in Shotgun.

    Parameters

    Parameter In Type Required Description
    entity path string true The name of the entity type to interact with. The entity name should be passed in its snake_case form. Ex: CustomNonProjectEntity01 would be custom_non_project_entity_01.
    field_name path string true The field on the entity.
    revive query boolean true Revive flag. Should be set to 1 or true.

    Example responses

    401 undefined

    {
      "errors": [
        {
          "id": "a4c9279479129dcd4413145f1fcdbd78",
          "status": 400,
          "code": 103,
          "title": "Request Parameters invalid.",
          "source": {
            "entity": [
              "entity is not valid"
            ]
          },
          "detail": null,
          "meta": null
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    204 No Content Field for entity successfully revived. None
    401 Unauthorized Request rejected due to invalid credentials. ErrorResponse

    Get Access Tokens

    Endpoints for authenticating credentials to get access_tokens

    Request access token

    Code samples

    # You can also use wget
    curl -X POST https://yoursite.shotgunstudio.com/api/v1/auth/access_token \
      -H 'Content-Type: application/x-www-form-urlencoded' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    POST https://yoursite.shotgunstudio.com/api/v1/auth/access_token HTTP/1.1
    Host: shotgun.mystudio.com
    Content-Type: application/x-www-form-urlencoded
    Accept: application/json
    
    
    var headers = {
      'Content-Type':'application/x-www-form-urlencoded',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://yoursite.shotgunstudio.com/api/v1/auth/access_token',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    const inputBody = '{
      "grant_type": "password",
      "username": "artist_1",
      "password": "password"
    }';
    const headers = {
      'Content-Type':'application/x-www-form-urlencoded',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://yoursite.shotgunstudio.com/api/v1/auth/access_token',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/x-www-form-urlencoded',
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.post 'https://yoursite.shotgunstudio.com/api/v1/auth/access_token',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.post('https://yoursite.shotgunstudio.com/api/v1/auth/access_token', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://yoursite.shotgunstudio.com/api/v1/auth/access_token");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("POST");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/x-www-form-urlencoded"},
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://yoursite.shotgunstudio.com/api/v1/auth/access_token", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /auth/access_token

    Get an access token to use in the Authorization header for all other requests. See the Authentication section for more information.

    Body parameter

    grant_type: password
    username: artist_1
    password: password
    
    

    Parameters

    Parameter In Type Required Description
    body body any true No description

    Example responses

    200 undefined

    {}
    

    401 undefined

    {
      "errors": [
        {
          "id": "a4c9279479129dcd4413145f1fcdbd78",
          "status": 400,
          "code": 103,
          "title": "Request Parameters invalid.",
          "source": {
            "entity": [
              "entity is not valid"
            ]
          },
          "detail": null,
          "meta": null
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    200 OK User has been authenticated. Inline
    401 Unauthorized Request rejected due to invalid credentials. ErrorResponse

    Response Schema

    Status Code 200

    Name Type Required Description
    » token_type string false The type of token being returned. This should prefix your access_token in the Authorization header sent with requests.
    » access_token string false The token to be used in the Authorization header to makes requests.
    » expires_in integer false The number of seconds the access_token is valid for.
    » refresh_token string false The token to be used with they refresh grant type to generate a new access token.

    Get OpenAPI Spec

    Endpoints for generating this file.

    OpenAPI v3 Spec

    Code samples

    # You can also use wget
    curl -X GET https://yoursite.shotgunstudio.com/api/v1/spec.{format} \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    GET https://yoursite.shotgunstudio.com/api/v1/spec.{format} HTTP/1.1
    Host: shotgun.mystudio.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://yoursite.shotgunstudio.com/api/v1/spec.{format}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://yoursite.shotgunstudio.com/api/v1/spec.{format}',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.get 'https://yoursite.shotgunstudio.com/api/v1/spec.{format}',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.get('https://yoursite.shotgunstudio.com/api/v1/spec.{format}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://yoursite.shotgunstudio.com/api/v1/spec.{format}");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://yoursite.shotgunstudio.com/api/v1/spec.{format}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /spec.{format}

    The endpoint provides the OpenAPI v3 specification for a version of the API.

    Parameters

    Parameter In Type Required Description
    format path string true File format in which the specification should be returned.

    Enumerated Values

    Parameter Value
    format yaml
    format json

    Example responses

    200 undefined

    {}
    

    Responses

    Status Meaning Description Schema
    200 OK OpenAPI specification has been retrieved. Inline

    Response Schema

    Status Code 200

    Name Type Required Description

    Get Shotgun Server Info

    Get Info

    Code samples

    # You can also use wget
    curl -X GET https://yoursite.shotgunstudio.com/api/v1/ \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    GET https://yoursite.shotgunstudio.com/api/v1/ HTTP/1.1
    Host: shotgun.mystudio.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://yoursite.shotgunstudio.com/api/v1/',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://yoursite.shotgunstudio.com/api/v1/',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.get 'https://yoursite.shotgunstudio.com/api/v1/',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.get('https://yoursite.shotgunstudio.com/api/v1/', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://yoursite.shotgunstudio.com/api/v1/");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://yoursite.shotgunstudio.com/api/v1/", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /

    The endpoint provides version information about the Shotgun server and the REST API.

    Example responses

    200 undefined

    {}
    

    Responses

    Status Meaning Description Schema
    200 OK API and Shotgun version have been retrieved. Inline

    Response Schema

    Status Code 200

    Name Type Required Description
    » data object false No description
    »» shotgun_version string false The Shotgun server version number.
    »» api_version string false The REST API version number.

    Uploading files

    In the REST API uploading a file is a 3 step process, which allows for both uploads to the Shotgun application server and uploads direct to AWS S3 to look nearly identical. The 3 steps are:

    1. Request an upload URL.
    2. Upload the file to the url returned.
    3. Send the data required to link the file to a record or field on a record.

    Requesting an upload URL

    Example Response

    {
    "data": {
        "timestamp": "2018-04-16T21:42:13Z",
        "upload_type": "Thumbnail",
        "upload_id": null,
        "storage_service": "sg",
        "original_filename": "sg_billboard.jpg",
        "multipart_upload": false
    },
    "links": {
        "upload": "/api/v1/entity/projects/86/image/_upload?filename=sg_billboard.jpg&signature=OaHsK%2BrkZk5w1GxgxI3aNmJ0H3Y%3D",
        "complete_upload": "/api/v1/entity/projects/86/image/_upload"
    }
    }
    

    To get an upload URL, a GET request with the filename is sent to the /_upload endpoint of the record or field you want to link to. The response includes two keys “data” and “links”. The “data” key contains information about the upload and is required to link the upload to the record or field on the record. The “links” key contains links to where the upload should be sent, the url to complete the upload and if enabled the link to get the next upload URL for a S3 multi-part upload. More information about the request parameters can be found in the "Get upload URL for record" and the "Get upload URL for field" sections and more information about the response can be found here.

    Uploading a file

    In the response for getting an upload URL one of 3 URL types will be returned. The 3 possible upload URLs are, a URL to the Shotgun application server, a pre-signed S3 upload URL, or a pre-signed S3 multi-part upload URL (for uploading part 1). All 3 behave very similarly, the file data must be the body of a PUT request to the URL and the headers for Content-Type and Content-Size must be set.

    Uploading to the Shotgun application server

    Shotgun app server example response

    {
    "data": {
        "upload_id": "2c099e28-3f44-11e8-a8f7-0242ac190005",
        "original_filename": "sg_billboard.jpg"
    },
    "links": {
        "complete": "/api/v1/entity/projects/86/image/_upload?filename=sg_billboard.jpg&signature=OaHsK%2BrkZk5w1GxgxI3aNmJ0H3Y%3D"
    }
    }
    

    When uploading to this endpoint in the way noted above, a successful request will return an object similar to what was returned by the upload URL request. The "data" section of this object should be combined with the "data" section from the upload URL request and will be used in the complete upload request.

    Uploading to S3 (non-multi-part)

    This type of upload requires no extra steps before making the complete upload request.

    Uploading to S3 (multi-part)

    For uploads directly to S3 larger than 20MB, multi-part upload should be used. When using multi-part upload two things are required to be done after each part is uploaded. First, the "ETag" header value should be stored for later use in the upload complete request. Second, if there is more data to upload, a request will need to be made to get the upload URL for the next part. The initial upload URL request and each subsequent part upload URL request will contain a URL in the "links" section called "get_next_part", this is the URL to use to get the next part upload URL if it is needed. If for some reason an upload needs to be aborted there is an multi-part abort endpoint that can be used. This endpoint takes the "data" from the initial upload URL request as the POST body of the abort request.

    Completing an upload

    Example Request (S3 Multi-part)

    {
    "upload_info": {
      "etags": ["\"6d2ecc0fe4b5d1bq93ba9546316dd6f87\"", "\"32edb9df974fa3154e02q59525440e4b9\""],
      "upload_id": "zE1dma8DPHq5ZwtXAbPS1P8C4WWymt3OCX13VUSdonry7BwD7fkWbFIejYByIJqKqS9DTwb5grPmOZy2UxbFe5..8C6XilqMJrPrnuaIMrqU.LRc6pzdRypxqY1FrBfrYExWnO",
      "upload_type": "Attachment",
      "original_filename": "bbb_sunflower_1080p_30fps_normal.mp4",
      "multipart_upload": true,
      "timestamp": "2018-04-04T00:06:48Z",
      "storage_service": "s3"
    },
    "upload_data": {
      "display_name": "Big Buck Bunny"
    }
    }
    

    Now that the data has been uploaded to one of the storage services, the upload needs to be linked to the correct record or field. This is done by making a POST request to the "complete" URL provided in the "links" section of the upload URL response. The body for this request has two sections:

    The response from this request will either be a 204 No Content meaning success or a 400 error which will include information about why the request failed.

    Get upload URL for record

    Code samples

    # You can also use wget
    curl -X GET https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/_upload?filename=string \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    GET https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/_upload?filename=string HTTP/1.1
    Host: shotgun.mystudio.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/_upload',
      method: 'get',
      data: '?filename=string',
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/_upload?filename=string',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.get 'https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/_upload',
      params: {
      'filename' => 'string'
    }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.get('https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/_upload', params={
      'filename': 'string'
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/_upload?filename=string");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/_upload", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /entity/{entity}/{record_id}/_upload

    This endpoint provides the information for where an upload should be sent and how to connect the upload to a record once it has been uploaded.

    Parameters

    Parameter In Type Required Description
    entity path string true The name of the entity type to interact with. The entity name should be passed in its plural snake_case form. Ex: CustomNonProjectEntity01 would be custom_non_project_entity_01s.
    record_id path integer true Id of the record to connect the upload to.
    filename query string true The name of the file to be uploaded.

    Example responses

    200 undefined

    {
      "data": {
        "timestamp": "2018-04-16T21:42:13Z",
        "upload_type": "Thumbanil",
        "upload_id": null,
        "storage_service": "sg",
        "original_filename": "logo.png",
        "multipart_upload": false
      },
      "links": {
        "upload": "/api/v1/entity/projects/86/image/_upload?filename=logo.png&signature=OaHsK%2BrkZk5w1GxgxI3aNmJ0H3Y%3D",
        "complete_upload": "/api/v1/entity/projects/86/image/_upload"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK The information needed to upload a file to Shotgun or S3. UploadInfoResponse
    401 Unauthorized Request rejected due to invalid credentials. ErrorResponse
    404 Not Found Record does not exist. ErrorResponse

    Upload file to record

    Code samples

    # You can also use wget
    curl -X PUT https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/_upload?filename=string&signature=string \
      -H 'Content-Type: */*' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    PUT https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/_upload?filename=string&signature=string HTTP/1.1
    Host: shotgun.mystudio.com
    Content-Type: */*
    Accept: application/json
    
    
    var headers = {
      'Content-Type':'*/*',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/_upload',
      method: 'put',
      data: '?filename=string&signature=string',
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    const inputBody = 'string';
    const headers = {
      'Content-Type':'*/*',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/_upload?filename=string&signature=string',
    {
      method: 'PUT',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => '*/*',
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.put 'https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/_upload',
      params: {
      'filename' => 'string',
    'signature' => 'string'
    }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': '*/*',
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.put('https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/_upload', params={
      'filename': 'string',  'signature': 'string'
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/_upload?filename=string&signature=string");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("PUT");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"*/*"},
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("PUT", "https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/_upload", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    PUT /entity/{entity}/{record_id}/_upload

    This endpoint is where a file should be uploaded.

    Body parameter

    Parameters

    Parameter In Type Required Description
    entity path string true The name of the entity type to interact with. The entity name should be passed in its plural snake_case form. Ex: CustomNonProjectEntity01 would be custom_non_project_entity_01s.
    record_id path integer true Id of the record to connect the upload to.
    filename query string true The name of the file to be uploaded.
    signature query string true Signature to validate the request.
    body body string(binary) true The data to be uploaded.

    Example responses

    200 undefined

    {
      "data": {
        "upload_id": "2a36e9b8-419f-11e8-ac9f-0242ac190005",
        "original_filename": "logo.png"
      },
      "links": {
        "complete_upload": "/api/v1/entity/projects/86/image/_upload"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK The information needed to complete an upload to Shotgun. UploadResponse
    401 Unauthorized Request rejected due to invalid credentials. ErrorResponse
    404 Not Found Record does not exist. ErrorResponse

    Complete upload for record

    Code samples

    # You can also use wget
    curl -X POST https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/_upload?filename=string \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    POST https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/_upload?filename=string HTTP/1.1
    Host: shotgun.mystudio.com
    Content-Type: application/json
    Accept: application/json
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/_upload',
      method: 'post',
      data: '?filename=string',
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    const inputBody = '{
      "upload_info": {
        "timestamp": "string",
        "upload_type": "Attachment",
        "upload_id": "string",
        "storage_service": "sg",
        "original_filename": "string",
        "multipart_upload": true,
        "etags": [
          "string"
        ]
      },
      "upload_data": {
        "display_name": "string",
        "tags": [
          {
            "type": "string",
            "id": 0
          }
        ]
      }
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/_upload?filename=string',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.post 'https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/_upload',
      params: {
      'filename' => 'string'
    }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.post('https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/_upload', params={
      'filename': 'string'
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/_upload?filename=string");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("POST");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json"},
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/_upload", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /entity/{entity}/{record_id}/_upload

    This endpoint links an upload to a record. The information sent to it the response data from the request to get an upload URL and the upload request.

    Body parameter

    {
      "upload_info": {
        "timestamp": "string",
        "upload_type": "Attachment",
        "upload_id": "string",
        "storage_service": "sg",
        "original_filename": "string",
        "multipart_upload": true,
        "etags": [
          "string"
        ]
      },
      "upload_data": {
        "display_name": "string",
        "tags": [
          {
            "type": "string",
            "id": 0
          }
        ]
      }
    }
    

    Parameters

    Parameter In Type Required Description
    entity path string true The name of the entity type to interact with. The entity name should be passed in its plural snake_case form. Ex: CustomNonProjectEntity01 would be custom_non_project_entity_01s.
    record_id path integer true Id of the record to connect the upload to.
    filename query string true The name of the file to be uploaded.
    body body object true The data to be uploaded.
    » upload_info body object true No description
    »» timestamp body string true The ISO 8601 timestamp of this request. Used in the complete request to set the created_at value of the upload.
    »» upload_type body string true The type of upload that the server has determined this request is for.
    »» upload_id body string true A unique identifier for the upload. This will be set for 's3' uploads but for 'sg' uploads the value will be provided after the file is uploaded.
    »» storage_service body string true The location of there the file will be uploaded. 'sg' is the Shotgun Application server. 's3' is Amazon AWS S3.
    »» original_filename body string true The original filename that was provided in the request.
    »» multipart_upload body boolean true Indicates if the upload was a multi-part upload.
    »» etags body [string] false Required for S3 multi-part uploads. After each part is uploaded to S3 the response from S3 contain an 'ETag' header those values should gather and passed in this array.
    » upload_data body object true No description
    »» display_name body string false Optional display name for an Attachment.
    »» tags body [object] false Tags to link to an Attachment.
    »»» type body string true This should be 'Tag'.
    »»» id body integer true The id of the Tag to link to the Attachment

    Enumerated Values

    Parameter Value
    »» upload_type Attachment
    »» upload_type Thumbnail
    »» storage_service sg
    »» storage_service s3

    Example responses

    401 undefined

    {
      "errors": [
        {
          "id": "a4c9279479129dcd4413145f1fcdbd78",
          "status": 400,
          "code": 103,
          "title": "Request Parameters invalid.",
          "source": {
            "entity": [
              "entity is not valid"
            ]
          },
          "detail": null,
          "meta": null
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    204 No Content Attachment has been created and linked to the record. None
    401 Unauthorized Request rejected due to invalid credentials. ErrorResponse
    404 Not Found Record does not exist. ErrorResponse

    Get upload URL for field

    Code samples

    # You can also use wget
    curl -X GET https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/{field_name}/_upload?filename=string \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    GET https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/{field_name}/_upload?filename=string HTTP/1.1
    Host: shotgun.mystudio.com
    Content-Type: application/json
    Accept: application/json
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/{field_name}/_upload',
      method: 'get',
      data: '?filename=string',
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    const inputBody = '{
      "upload_info": {
        "timestamp": "string",
        "upload_type": "Attachment",
        "upload_id": "string",
        "storage_service": "sg",
        "original_filename": "string",
        "multipart_upload": true,
        "etags": [
          "string"
        ]
      },
      "upload_data": {
        "display_name": "string",
        "tags": [
          {
            "type": "string",
            "id": 0
          }
        ]
      }
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/{field_name}/_upload?filename=string',
    {
      method: 'GET',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.get 'https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/{field_name}/_upload',
      params: {
      'filename' => 'string'
    }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.get('https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/{field_name}/_upload', params={
      'filename': 'string'
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/{field_name}/_upload?filename=string");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json"},
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/{field_name}/_upload", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /entity/{entity}/{record_id}/{field_name}/_upload

    This endpoint provides the information for where an upload should be sent and how to connect the upload to a field once it has been uploaded.

    Body parameter

    {
      "upload_info": {
        "timestamp": "string",
        "upload_type": "Attachment",
        "upload_id": "string",
        "storage_service": "sg",
        "original_filename": "string",
        "multipart_upload": true,
        "etags": [
          "string"
        ]
      },
      "upload_data": {
        "display_name": "string",
        "tags": [
          {
            "type": "string",
            "id": 0
          }
        ]
      }
    }
    

    Parameters

    Parameter In Type Required Description
    entity path string true The name of the entity type to interact with. The entity name should be passed in its plural snake_case form. Ex: CustomNonProjectEntity01 would be custom_non_project_entity_01s.
    record_id path integer true Id of the record to connect the upload to.
    filename query string true The name of the file to be uploaded.
    field_name path string true The field on the entity.
    body body object true The data to be uploaded.
    » upload_info body object true No description
    »» timestamp body string true The ISO 8601 timestamp of this request. Used in the complete request to set the created_at value of the upload.
    »» upload_type body string true The type of upload that the server has determined this request is for.
    »» upload_id body string true A unique identifier for the upload. This will be set for 's3' uploads but for 'sg' uploads the value will be provided after the file is uploaded.
    »» storage_service body string true The location of there the file will be uploaded. 'sg' is the Shotgun Application server. 's3' is Amazon AWS S3.
    »» original_filename body string true The original filename that was provided in the request.
    »» multipart_upload body boolean true Indicates if the upload was a multi-part upload.
    »» etags body [string] false Required for S3 multi-part uploads. After each part is uploaded to S3 the response from S3 contain an 'ETag' header those values should gather and passed in this array.
    » upload_data body object true No description
    »» display_name body string false Optional display name for an Attachment.
    »» tags body [object] false Tags to link to an Attachment.
    »»» type body string true This should be 'Tag'.
    »»» id body integer true The id of the Tag to link to the Attachment

    Enumerated Values

    Parameter Value
    »» upload_type Attachment
    »» upload_type Thumbnail
    »» storage_service sg
    »» storage_service s3

    Example responses

    401 undefined

    {
      "errors": [
        {
          "id": "a4c9279479129dcd4413145f1fcdbd78",
          "status": 400,
          "code": 103,
          "title": "Request Parameters invalid.",
          "source": {
            "entity": [
              "entity is not valid"
            ]
          },
          "detail": null,
          "meta": null
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    204 No Content Attachment or Thumbnail has been created and set as the value on the selected field. None
    401 Unauthorized Request rejected due to invalid credentials. ErrorResponse
    404 Not Found Record does not exist. ErrorResponse

    Upload file to field

    Code samples

    # You can also use wget
    curl -X PUT https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/{field_name}/_upload?filename=string&signature=string \
      -H 'Content-Type: */*' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    PUT https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/{field_name}/_upload?filename=string&signature=string HTTP/1.1
    Host: shotgun.mystudio.com
    Content-Type: */*
    Accept: application/json
    
    
    var headers = {
      'Content-Type':'*/*',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/{field_name}/_upload',
      method: 'put',
      data: '?filename=string&signature=string',
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    const inputBody = 'string';
    const headers = {
      'Content-Type':'*/*',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/{field_name}/_upload?filename=string&signature=string',
    {
      method: 'PUT',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => '*/*',
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.put 'https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/{field_name}/_upload',
      params: {
      'filename' => 'string',
    'signature' => 'string'
    }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': '*/*',
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.put('https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/{field_name}/_upload', params={
      'filename': 'string',  'signature': 'string'
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/{field_name}/_upload?filename=string&signature=string");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("PUT");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"*/*"},
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("PUT", "https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/{field_name}/_upload", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    PUT /entity/{entity}/{record_id}/{field_name}/_upload

    This endpoint is where a file should be uploaded.

    Body parameter

    Parameters

    Parameter In Type Required Description
    entity path string true The name of the entity type to interact with. The entity name should be passed in its plural snake_case form. Ex: CustomNonProjectEntity01 would be custom_non_project_entity_01s.
    record_id path integer true Id of the record to connect the upload to.
    filename query string true The name of the file to be uploaded.
    field_name path string true The field on the entity.
    signature query string true Signature to validate the request.
    body body string(binary) true The data to be uploaded.

    Example responses

    200 undefined

    {
      "data": {
        "upload_id": "2a36e9b8-419f-11e8-ac9f-0242ac190005",
        "original_filename": "logo.png"
      },
      "links": {
        "complete_upload": "/api/v1/entity/projects/86/image/_upload"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK The information needed to complete an upload to Shotgun. UploadResponse
    401 Unauthorized Request rejected due to invalid credentials. ErrorResponse
    404 Not Found Record does not exist. ErrorResponse

    Complete upload for field

    Code samples

    # You can also use wget
    curl -X POST https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/{field_name}/_upload?filename=string \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    POST https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/{field_name}/_upload?filename=string HTTP/1.1
    Host: shotgun.mystudio.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/{field_name}/_upload',
      method: 'post',
      data: '?filename=string',
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/{field_name}/_upload?filename=string',
    {
      method: 'POST',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.post 'https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/{field_name}/_upload',
      params: {
      'filename' => 'string'
    }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.post('https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/{field_name}/_upload', params={
      'filename': 'string'
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/{field_name}/_upload?filename=string");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("POST");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://yoursite.shotgunstudio.com/api/v1/entity/{entity}/{record_id}/{field_name}/_upload", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /entity/{entity}/{record_id}/{field_name}/_upload

    This endpoint links an upload to a field on a record. The information sent to it the response data from the request to get an upload URL and the upload request.

    Parameters

    Parameter In Type Required Description
    entity path string true The name of the entity type to interact with. The entity name should be passed in its plural snake_case form. Ex: CustomNonProjectEntity01 would be custom_non_project_entity_01s.
    record_id path integer true Id of the record to connect the upload to.
    filename query string true The name of the file to be uploaded.
    field_name path string true The field on the entity.

    Example responses

    200 undefined

    {
      "data": {
        "id": 24,
        "name": "Shotgun Support",
        "type": "HumanUser"
      },
      "links": {
        "self": "/api/v1/entity/projects/82/relationships/created_by"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Record relationships have been retrieved. RelationshipsResponse
    401 Unauthorized Request rejected due to invalid credentials. ErrorResponse
    404 Not Found Record does not exist. ErrorResponse

    Object Definitions

    TextSearchRequest

    {
      "text": "Bunny",
      "entity_types": {
        "Project": {
          "logical_operator": "and",
          "conditions": [
            [
              "is_demo",
              "is",
              true
            ]
          ]
        }
      },
      "sort": "-id",
      "page": {
        "number": 1,
        "size": 20
      }
    }
    

    Properties

    Name Type Required Description
    additionalProperties object false With any entity name given as a key, the value of this property is either a FilterHash or a FilterArray

    oneOf

    Name Type Required Description
    » anonymous FilterArray false No description

    xor

    Name Type Required Description
    » anonymous FilterHash false No description

    continued

    Name Type Required Description
    page PaginationParameter false No description
    text string false Text to search for in Shotgun.
    sort string false List of comma-separated fields to use for sorting records. By default, fields are sorted by ascending order. Prefixing a field's name with - will sort records with that field in decreasing order.

    {
      "self": "/api/v1/projects/82"
    }
    

    Properties

    Name Type Required Description
    self string false Link to the record.

    {
      "self": "/api/v1/projects?page%5Bnumber%5D=2&page%5Bsize%5D=500",
      "next": "/api/v1/projects?page%5Bnumber%5D=3&page%5Bsize%5D=500",
      "prev": "/api/v1/projects?page%5Bnumber%5D=1&page%5Bsize%5D=500"
    }
    

    Properties

    Name Type Required Description
    self string false Link to current page of results
    next string false Link to next page of results
    prev string false Link to previous page of results. Only present if the current page number is greater than 1.

    Record

    {
      "id": 82,
      "type": "Project",
      "attributes": {
        "name": "Demo Project"
      },
      "relationships": {
        "users": [
          {
            "id": 19,
            "name": "Artist 1",
            "type": "HumanUser"
          },
          {
            "id": 18,
            "name": "Artist 2",
            "type": "HumanUser"
          }
        ],
        "created_by": {
          "id": 24,
          "name": "Shotgun Support",
          "type": "HumanUser"
        }
      },
      "links": {
        "self": "/api/v1/projects/82"
      }
    }
    

    Properties

    Name Type Required Description
    id integer false Id of Entity
    type string false Entity Type
    attributes object false A hash of any record attributes requested.
    relationships object false A hash of any record relationships requested.
    links SelfLink false No description

    FollowRecord

    {
      "id": 82,
      "type": "Task",
      "links": {
        "self": "/api/v1/projects/82"
      }
    }
    

    Properties

    Name Type Required Description
    id integer false Entity Id
    type string false Entity Type
    links SelfLink false No description

    FollowerRecord

    {
      "id": 82,
      "type": "HumanUser",
      "attributes": {
        "name": "Artist 1"
      },
      "links": {
        "self": "/api/v1/projects/82"
      }
    }
    

    Properties

    Name Type Required Description
    id integer false Entity Id
    type string false Entity Type
    attributes object false A hash of additional follow data
    » name string false Entity name
    links SelfLink false No description

    EntityIdentifier

    {
      "record_id": 5,
      "entity": "Task"
    }
    

    Properties

    Name Type Required Description
    record_id integer false Entity Id
    entity string false Entity Type

    PaginatedRecordResponse

    {
      "data": [
        {
          "id": 82,
          "type": "Project",
          "attributes": {
            "name": "Demo Project"
          },
          "relationships": {
            "users": [
              {
                "id": 19,
                "name": "Artist 1",
                "type": "HumanUser"
              },
              {
                "id": 18,
                "name": "Artist 2",
                "type": "HumanUser"
              }
            ],
            "created_by": {
              "id": 24,
              "name": "Shotgun Support",
              "type": "HumanUser"
            }
          },
          "links": {
            "self": "/api/v1/projects/82"
          }
        }
      ],
      "links": {
        "self": "/api/v1/projects?page%5Bnumber%5D=2&page%5Bsize%5D=500",
        "next": "/api/v1/projects?page%5Bnumber%5D=3&page%5Bsize%5D=500",
        "prev": "/api/v1/projects?page%5Bnumber%5D=1&page%5Bsize%5D=500"
      }
    }
    

    Properties

    Name Type Required Description
    data [Record] false No description
    links PaginationLinks false No description

    BatchedRequestsResponse

    {
      "data": []
    }
    

    Properties

    Name Type Required Description
    data [#components/schemas/Record] false No description

    FieldHashResponse

    {
      "data": {
        "url": "https://sg-media-staging-usor-01.s3.amazonaws.com/1fe6dc157568e9ae589d66c109ace519dfee3699/f401cb001bdab191fdb6bbaa3d1a98f442a0fad6/08_a-team_001_ANIM_001.mov?AWSAccessKeyId=AKIAIZVDUP76QG4A6G3A&Expires=1524506637&Signature=Ylx%2BP3V7wYqNC6HtNv3crAU5HIM%3D&response-content-disposition=filename%3D%2208_a-team_001_ANIM_001.mov%22&x-amz-meta-user-id=85&x-amz-meta-user-type=HumanUser",
        "name": "08_a-team_001_ANIM_001.mov",
        "content_type": "video/quicktime",
        "link_type": "upload",
        "type": "Attachment",
        "id": 111
      },
      "links": {
        "self": "/api/v1/entity/versions/6003/sg_uploaded_movie"
      }
    }
    

    Properties

    Name Type Required Description
    data any false URL to download an image or an attachment hash. Empty if the field is empty.

    anyOf

    Name Type Required Description
    » anonymous string false URL to an image.

    or

    Name Type Required Description
    » anonymous object false Attachment hash.

    continued

    Name Type Required Description
    links SelfLink false No description

    EntityActivityStreamResponse

    {
      "data": {
        "entity_type": "Shot",
        "entity_id": 5,
        "latest_update_id": 9,
        "earliest_update_id": 0,
        "updates": [
          {
            "id": 9,
            "update_type": "update",
            "meta": {
              "type": "attribute_change",
              "attribute_name": "sg_status_list",
              "entity_type": "Shot",
              "entity_id": 5,
              "field_data_type": "status_list",
              "old_value": null,
              "new_value": "act"
            },
            "created_at": "2018-05-30T04:57:24Z",
            "read": false,
            "primary_entity": {
              "type": "Shot",
              "id": 5,
              "name": "shot 5",
              "status": "act"
            },
            "created_by": {
              "type": "ApiUser",
              "id": 10,
              "name": "A api user",
              "status": "act",
              "image": null
            }
          }
        ]
      },
      "links": {
        "self": "/api/v1/entity/shots/5/activity_stream"
      }
    }
    

    Properties

    Name Type Required Description
    data object false The name of the entity and if the entity is visible.
    » entity_id integer false Id of Entity
    » entity_type string false Entity Type
    » latest_update_id integer false Last updated id.
    » earliest_update_id integer false Earliest updated id.
    » updates array false Array of activities
    links SelfLink false No description

    SingleRecordResponse

    {
      "data": {
        "type": "Project",
        "attributes": {
          "tank_name": null,
          "end_date": null,
          "duration": null,
          "tracking_settings": {
            "navchains": {
              "Asset": "Asset.sg_asset_type",
              "Shot": "Shot.sg_sequence",
              "Cut": "Cut.entity",
              "CutItem": "CutItem.cut.entity"
            }
          },
          "color": "129,183,255",
          "client_site_settings_saved": false,
          "last_accessed_by_current_user": null,
          "code": null,
          "start_date": null,
          "sg_status": null,
          "cached_display_name": "Film Template",
          "billboard": null,
          "sg_description": null,
          "filmstrip_image": null,
          "is_template": true,
          "created_at": "2016-03-11T01:54:00Z",
          "updated_at": "2018-02-28T22:46:35Z",
          "sg_type": "Feature",
          "image": null,
          "landing_page_url": "/page/project_overview?project_id=82",
          "archived": false,
          "is_demo": false,
          "current_user_favorite": false,
          "name": "Film Template"
        },
        "relationships": {
          "users": {
            "data": [
              {
                "id": 19,
                "name": "Artist 1",
                "type": "HumanUser"
              },
              {
                "id": 18,
                "name": "Artist 2",
                "type": "HumanUser"
              },
              {
                "id": 66,
                "name": "Manager 1",
                "type": "HumanUser"
              }
            ],
            "links": {
              "self": "/api/v1/entity/projects/82/relationships/users"
            }
          },
          "layout_project": {
            "data": {
              "id": 70,
              "name": "Demo: Animation",
              "type": "Project"
            },
            "links": {
              "self": "/api/v1/entity/projects/82/relationships/layout_project",
              "related": "/api/v1/entity/projects/70"
            }
          },
          "phases": {
            "data": [],
            "links": {
              "self": "/api/v1/entity/projects/82/relationships/phases"
            }
          },
          "created_by": {
            "data": {
              "id": 24,
              "name": "Shotgun Support",
              "type": "HumanUser"
            },
            "links": {
              "self": "/api/v1/entity/projects/82/relationships/created_by",
              "related": "/api/v1/entity/human_users/24"
            }
          },
          "updated_by": {
            "data": {
              "id": 24,
              "name": "Shotgun Support",
              "type": "HumanUser"
            },
            "links": {
              "self": "/api/v1/entity/projects/82/relationships/updated_by",
              "related": "/api/v1/entity/human_users/24"
            }
          },
          "tags": {
            "data": [],
            "links": {
              "self": "/api/v1/entity/projects/82/relationships/tags"
            }
          },
          "task_templates": {
            "data": [],
            "links": {
              "self": "/api/v1/entity/projects/82/relationships/task_templates"
            }
          }
        },
        "id": 82
      },
      "links": {
        "self": "/api/v1/entity/projects/82"
      }
    }
    

    Properties

    Name Type Required Description
    data Record false No description
    links SelfLink false No description

    RelationshipsResponse

    {
      "data": {
        "id": 24,
        "name": "Shotgun Support",
        "type": "HumanUser"
      },
      "links": {
        "self": "/api/v1/entity/projects/82/relationships/created_by"
      }
    }
    

    Properties

    Name Type Required Description
    data any false No description

    oneOf

    Name Type Required Description
    » anonymous Record false No description

    xor

    Name Type Required Description
    » anonymous [Record] false No description

    continued

    Name Type Required Description
    links object false No description
    » self string false Link to the relationship being viewed.

    ErrorResponse

    {
      "errors": [
        {
          "id": "a4c9279479129dcd4413145f1fcdbd78",
          "status": 400,
          "code": 103,
          "title": "Request Parameters invalid.",
          "source": {
            "entity": [
              "entity is not valid"
            ]
          },
          "detail": null,
          "meta": null
        }
      ]
    }
    

    Properties

    Name Type Required Description
    errors [ErrorObject] false No description

    SummarizeResponse

    {
      "data": {
        "summaries": {
          "id": 3
        },
        "groups": [
          {
            "group_name": "Character",
            "group_value": "Character",
            "summaries": {
              "id": 3
            }
          },
          {
            "group_name": "Plate",
            "group_value": "Plate",
            "summaries": {
              "id": 2
            }
          }
        ]
      }
    }
    

    Properties

    Name Type Required Description
    data object false No description
    » summaries object false The total summary for the query.
    »» additionalProperties any false No description

    anyOf

    Name Type Required Description
    »»» anonymous string false No description

    or

    Name Type Required Description
    »»» anonymous integer false No description

    or

    Name Type Required Description
    »»» anonymous boolean false No description

    or

    Name Type Required Description
    »»» anonymous object false No description

    continued

    Name Type Required Description
    »» groups [object] false The summary for each group.
    »»» group_name string false The display name for the group.
    »»» group_value string false The actual value of the grouping value. This is often the same as group_name but in the case when grouping by entity, the group_name may be PuppyA and the group_value would be {'type':'Asset','id':922,'name':'PuppyA'}.
    »»» summaries object false The summary calculation dict for each field requested.
    »»»» additionalProperties any false No description

    anyOf

    Name Type Required Description
    »»»»» anonymous string false No description

    or

    Name Type Required Description
    »»»»» anonymous integer false No description

    or

    Name Type Required Description
    »»»»» anonymous boolean false No description

    or

    Name Type Required Description
    »»»»» anonymous object false No description

    EntityThreadContentsResponse

    {
      "data": [
        {
          "type": "Note",
          "id": 1,
          "content": "Hello, this is my note",
          "created_at": "2006-04-10T14:19:57Z",
          "created_by": null
        },
        {
          "type": "Reply",
          "id": 1,
          "content": "admin reply",
          "user": {
            "id": 8,
            "name": "Admin User",
            "type": "HumanUser",
            "image": null
          },
          "created_at": "2007-04-10T14:19:57Z"
        }
      ],
      "links": {
        "self": "/api/v1/entity/notes/1/thread_contents"
      }
    }
    

    Properties

    Name Type Required Description
    data [object] false An array of entities starting by the main Note and the thread in order.
    » id integer false Id of Entity
    » type string false Entity Type
    » content string false Content.
    » created_at string false The ISO 8601 timestamp of the creation of the entity.
    links SelfLink false No description

    ErrorObject

    {
      "id": "a4c9279479129dcd4413145f1fcdbd78",
      "status": "400",
      "code": "103",
      "title": "Request Parameters invalid.",
      "detail": "string",
      "source": {
        "entity": [
          "entity is not valid"
        ]
      },
      "meta": {
        "crud_error_uuid": "91602614-1dae-11e8-8f3d-0242ac190005"
      }
    }
    

    Properties

    Name Type Required Description
    id string false A unique identifier for this particular occurrence of the problem.
    status integer false HTTP status code.
    code integer false Shotgun defined error codes.
    title string false A short, human-readable summary of the problem.
    detail string false A human-readable explanation specific to this occurrence of the problem.
    source object false An object containing references to the source of the error.
    meta string false Non-standard meta-information about the error.

    SearchRequest

    {
      "filters": {
        "logical_operator": "or",
        "conditions": [
          [
            "is_demo",
            "is",
            true
          ],
          [
            "sg_status",
            "in",
            [
              "Hold",
              "Lost"
            ]
          ]
        ]
      }
    }
    

    Properties

    Name Type Required Description
    filters any false No description

    oneOf

    Name Type Required Description
    » anonymous FilterArray false No description

    xor

    Name Type Required Description
    » anonymous FilterHash false No description

    SummarizeRequest

    {
      "filters": [
        [
          "project",
          "is",
          {
            "type": "Project",
            "id": 4
          }
        ]
      ],
      "summary_fields": [
        {
          "field": "id",
          "type": "count"
        }
      ],
      "grouping": [
        {
          "field": "sg_asset_type",
          "type": "exact",
          "direction": "asc"
        }
      ],
      "options": {
        "include_archived_projects": true
      }
    }
    

    Hash containing grouping and summaries keys.

    Properties

    Hash containing grouping and summaries keys.

    Name Type Required Description
    summary_fields [object] false List of summaries to perform.
    » field string false The field name you are summarizing.
    » type string false The type of summary you are performing on the field. Summary types depend of the type of field you’re summarizing.
    filters any false No description

    oneOf

    Name Type Required Description
    » anonymous FilterArray false No description

    xor

    Name Type Required Description
    » anonymous FilterHash false No description

    continued

    Name Type Required Description
    grouping [object] false Allows to group records by certain fields to aggregate the results in different groups.
    » field string false A field name to group results by.
    » type string false A string indicating the type of grouping to perform for each group. Grouping types depend on the type of field you are grouping on.
    » direction string false A string that sets the order to display the grouped results.
    options object false Optional settings for the request.
    » include_archived_projects boolean false If enabled, the response will include records that are connected to archived projects. Defaults to false.

    Enumerated Values

    Property Value
    type record_count
    type count
    type sum
    type maximum
    type minimum
    type average
    type earliest
    type latest
    type percentage
    type status_percentage
    type status_list
    type checked
    type unchecked
    type exact
    type tens
    type hundreds
    type thousands
    type tensofthousands
    type hundredsofthousands
    type millions
    type day
    type week
    type month
    type quarter
    type year
    type clustered_date
    type oneday
    type fivedays
    type entitytype
    type firstletter
    direction asc
    direction desc

    FilterArray

    [
      [
        "string"
      ]
    ]
    

    Properties

    Name Type Required Description
    anonymous [FilterCondition] false No description

    FilterHash

    {
      "logical_operator": "and",
      "conditions": [
        [
          "string"
        ]
      ]
    }
    

    Properties

    Name Type Required Description
    logical_operator string false No description
    conditions any false No description

    oneOf

    Name Type Required Description
    » anonymous FilterArray false No description

    xor

    Name Type Required Description
    » anonymous FilterHash false No description

    Enumerated Values

    Property Value
    logical_operator and
    logical_operator or

    FilterCondition

    [
      "string"
    ]
    

    This is a 3 item array that contains: [<field>, <relation>, <value(s)>]'

    Properties

    This is a 3 item array that contains: [<field>, <relation>, <value(s)>]'

    anyOf

    Name Type Required Description
    anonymous string false No description

    or

    Name Type Required Description
    anonymous integer false No description

    or

    Name Type Required Description
    anonymous boolean false No description

    or

    Name Type Required Description
    anonymous array false No description

    or

    Name Type Required Description
    anonymous object false No description

    CreateOrUpdateRequest

    {
      "name": "Red Sun",
      "users": [
        {
          "id": 19,
          "name": "Artist 1",
          "type": "HumanUser"
        },
        {
          "id": 18,
          "name": "Artist 2",
          "type": "HumanUser"
        }
      ]
    }
    

    This object should contain the key value pairs for the fields you want to set.

    Properties

    This object should contain the key value pairs for the fields you want to set.

    Name Type Required Description
    additionalProperties string false Each key is the name of a field in the Shotgun database.

    OptionsParameter

    {
      "include_archived_projects": false,
      "include_template_projects": true,
      "return_only": "active"
    }
    

    Properties

    Name Type Required Description
    return_only string false If active, only active records will be returned. If retired, only retired records will be returned. Defaults to active.
    include_archived_projects boolean false If enabled, the response will include records that are connected to archived projects. Defaults to false.

    Enumerated Values

    Property Value
    return_only active
    return_only retired

    PaginationParameter

    {
      "size": 500,
      "number": 1
    }
    

    Properties

    Name Type Required Description
    size integer false The number of records to be returned pre page.
    number integer false The page of records to be returned.

    EntityFieldsParameter

    {
      "entity_fields[assets]": "fields1, fields2",
      "entity_fields[shots]": "fields1, fields2"
    }
    

    Indicates which fields to be returned when an entity is returned in the payload.

    Properties

    Indicates which fields to be returned when an entity is returned in the payload.

    Name Type Required Description
    entity string false The entity to be returned.
    fields [string] false List of comma-separated fields to return. If * is specified, all fields will be returned. Default: *

    PasswordRequest

    {
      "grant_type": "password",
      "username": "artist_1",
      "password": "password"
    }
    

    Properties

    Name Type Required Description
    grant_type string false OAuth 2.0 grant type. Should be set to password.
    username string false Username to login with.
    password string false The password for the username given.

    ClientCredentialsRequest

    {
      "grant_type": "client_credentials",
      "client_id": "api_script",
      "client_secret": "script_key"
    }
    

    Properties

    Name Type Required Description
    grant_type string false OAuth 2.0 grant type. Should be set to client_credentials.
    client_id string false API script name
    client_secret string false API script key

    RefreshRequest

    {
      "grant_type": "client_credentials",
      "refresh_token": "<long token string>"
    }
    

    Properties

    Name Type Required Description
    grant_type string false OAuth 2.0 grant type. Should be set to refresh.
    refresh_token string false Refresh token provided when an access_token was granted.

    SchemaResponseValue

    {
      "value": "string",
      "editable": true
    }
    

    Simple object that contains the attributes value and indicates if it is editable.

    Properties

    Simple object that contains the attributes value and indicates if it is editable.

    Name Type Required Description
    value any false The property's value.

    anyOf

    Name Type Required Description
    » anonymous string false No description

    or

    Name Type Required Description
    » anonymous boolean false No description

    continued

    Name Type Required Description
    editable boolean false Whether or not the property is editable.

    SchemaEntityRecord

    {
      "name": {
        "value": "string",
        "editable": true
      },
      "visible": {
        "value": "string",
        "editable": true
      }
    }
    

    The name of the entity and if the entity is visible.

    Properties

    The name of the entity and if the entity is visible.

    Name Type Required Description
    name SchemaResponseValue false No description
    visible SchemaResponseValue false No description

    SchemaFieldRecord

    {
      "name": {
        "value": "string",
        "editable": true
      },
      "description": {
        "value": "string",
        "editable": true
      },
      "entity_type": {
        "value": "string",
        "editable": true
      },
      "data_type": {
        "value": "string",
        "editable": true
      },
      "editable": {
        "value": "string",
        "editable": true
      },
      "mandatory": {
        "value": "string",
        "editable": true
      },
      "unique": {
        "value": "string",
        "editable": true
      },
      "visible": {
        "value": "string",
        "editable": true
      },
      "ui_value_displayable": {
        "value": "string",
        "editable": true
      },
      "properties": {
        "property1": {
          "value": "string",
          "editable": true
        },
        "property2": {
          "value": "string",
          "editable": true
        }
      }
    }
    

    The properties of a field.

    Properties

    The properties of a field.

    Name Type Required Description
    name SchemaResponseValue false No description
    description SchemaResponseValue false No description
    entity_type SchemaResponseValue false No description
    data_type SchemaResponseValue false No description
    editable SchemaResponseValue false No description
    mandatory SchemaResponseValue false No description
    unique SchemaResponseValue false No description
    visible SchemaResponseValue false No description
    ui_value_displayable SchemaResponseValue false No description
    properties object false Additional field specific properties.
    » additionalProperties SchemaResponseValue false No description

    SchemaEntityResponse

    {
      "data": {
        "name": {
          "value": "Project",
          "editable": false
        },
        "visible": {
          "value": true,
          "editable": false
        }
      },
      "links": {
        "self": "/api/v1/schema/projects"
      }
    }
    

    Properties

    Name Type Required Description
    data SchemaEntityRecord false No description
    links SelfLink false No description

    SchemaFieldResponse

    {
      "data": {
        "name": {
          "value": "Billboard",
          "editable": true
        },
        "description": {
          "value": "",
          "editable": true
        },
        "entity_type": {
          "value": "Project",
          "editable": false
        },
        "data_type": {
          "value": "url",
          "editable": false
        },
        "editable": {
          "value": true,
          "editable": false
        },
        "mandatory": {
          "value": false,
          "editable": false
        },
        "unique": {
          "value": false,
          "editable": false
        },
        "properties": {
          "default_value": {
            "value": null,
            "editable": false
          },
          "summary_default": {
            "value": "none",
            "editable": false
          },
          "open_in_new_window": {
            "value": true,
            "editable": false
          }
        },
        "visible": {
          "value": true,
          "editable": false
        },
        "ui_value_displayable": {
          "value": true,
          "editable": false
        }
      },
      "links": {
        "self": "/api/v1/schema/projects/fields/billboard"
      }
    }
    

    Properties

    Name Type Required Description
    data SchemaFieldRecord false No description
    links SelfLink false No description

    SchemaEntitiesResponse

    {
      "data": [
        {
          "ActionMenuItem": {
            "name": {
              "value": "Action Menu Item",
              "editable": false
            },
            "visible": {
              "value": true,
              "editable": false
            }
          },
          "ApiUser": {
            "name": {
              "value": "Script",
              "editable": false
            },
            "visible": {
              "value": true,
              "editable": false
            }
          },
          "ApiUserProjectConnection": {
            "name": {
              "value": "Api User Project Connection",
              "editable": false
            },
            "visible": {
              "value": true,
              "editable": false
            }
          },
          "AppWelcomeUserConnection": {
            "name": {
              "value": "App Welcome User Connection",
              "editable": false
            },
            "visible": {
              "value": true,
              "editable": false
            }
          },
          "Asset": {
            "name": {
              "value": "Asset",
              "editable": false
            },
            "visible": {
              "value": true,
              "editable": false
            }
          }
        }
      ],
      "links": {
        "self": "/api/v1/schema"
      }
    }
    

    Properties

    Name Type Required Description
    data object false No description
    » additionalProperties SchemaEntityRecord false No description
    links SelfLink false No description

    SchemaFieldsResponse

    {
      "data": {
        "tank_name": {
          "name": {
            "value": "Tank Name",
            "editable": true
          },
          "description": {
            "value": "",
            "editable": true
          },
          "entity_type": {
            "value": "Project",
            "editable": false
          },
          "data_type": {
            "value": "text",
            "editable": false
          },
          "editable": {
            "value": true,
            "editable": false
          },
          "mandatory": {
            "value": false,
            "editable": false
          },
          "unique": {
            "value": false,
            "editable": false
          },
          "properties": {
            "default_value": {
              "value": null,
              "editable": false
            },
            "summary_default": {
              "value": "none",
              "editable": true
            },
            "regex_validation": {
              "value": "",
              "editable": true
            },
            "regex_validation_enabled": {
              "value": null,
              "editable": true
            }
          },
          "visible": {
            "value": true,
            "editable": false
          },
          "ui_value_displayable": {
            "value": true,
            "editable": false
          }
        },
        "end_date": {
          "name": {
            "value": "End Date",
            "editable": true
          },
          "description": {
            "value": "",
            "editable": true
          },
          "entity_type": {
            "value": "Project",
            "editable": false
          },
          "data_type": {
            "value": "date",
            "editable": false
          },
          "editable": {
            "value": false,
            "editable": false
          },
          "mandatory": {
            "value": false,
            "editable": false
          },
          "unique": {
            "value": false,
            "editable": false
          },
          "properties": {
            "default_value": {
              "value": null,
              "editable": false
            },
            "summary_default": {
              "value": "none",
              "editable": true
            }
          },
          "visible": {
            "value": true,
            "editable": false
          },
          "ui_value_displayable": {
            "value": true,
            "editable": false
          }
        }
      },
      "links": {
        "self": "/api/v1/schema/project/fields"
      }
    }
    

    Properties

    Name Type Required Description
    data object false No description
    » additionalProperties SchemaFieldRecord false No description
    links SelfLink false No description

    CreateFieldRequest

    {
      "data_type": "checkbox",
      "properties": [
        {
          "property_name": "string",
          "value": "string"
        }
      ]
    }
    

    Properties

    Name Type Required Description
    data_type string true The data type of the field to create.
    properties [CreateUpdateFieldProperty] true The properties to set for the field.

    Enumerated Values

    Property Value
    data_type checkbox
    data_type currency
    data_type date
    data_type date_time
    data_type duration
    data_type entity
    data_type float
    data_type list
    data_type multi_entity
    data_type number
    data_type percent
    data_type status_list
    data_type text
    data_type timecode
    data_type footage
    data_type url
    data_type uuid
    data_type calculated

    UpdateFieldRequest

    {
      "properties": [
        {
          "property_name": "string",
          "value": "string"
        }
      ]
    }
    

    Properties

    Name Type Required Description
    properties [CreateUpdateFieldProperty] true The properties to set for the field.

    CreateUpdateFieldProperty

    {
      "property_name": "string",
      "value": "string"
    }
    

    Properties

    Name Type Required Description
    property_name string true The name of the property.
    value string true The value of the property

    HierarchyExpandRequest

    {
      "entity_fields": [
        {
          "entity": "string",
          "fields": [
            "string"
          ]
        }
      ],
      "path": "string",
      "seed_entity_field": "string"
    }
    

    Properties

    Name Type Required Description
    entity_fields [object] false Indicates which fields to be returned when an entity is returned in the payload.
    » entity string false The entity to be returned.
    » fields [string] false An array of fields to be returned.
    path string true It provides the target navigation level and is composed of all information to get there.
    seed_entity_field string false Indicates the schema to be used for the provided path. This seed is expected to be an 'entity' field.

    HierarchyExpandResponse

    {
      "data": {
        "label": "string",
        "ref": {
          "kind": "string",
          "value": {
            "type": "string",
            "id": 0
          }
        },
        "parent_path": "string",
        "path": "string",
        "target_entities": {
          "type": "string",
          "additional_filter_presets": [
            {
              "preset_name": "string",
              "path": "string",
              "seed": {
                "type": "string",
                "field": "string"
              }
            }
          ]
        },
        "has_children": true,
        "children": [
          null
        ]
      }
    }
    

    Properties

    Name Type Required Description
    data object false The navigation tree at a specific level.
    » label string false The name of the tree node.
    » ref object false Reference to the object the tree node is representing.
    »» kind string false This can be of type 'root', 'entity', 'entity_type' or 'list'.
    »» value object false Reference to the corresponding object.
    »»» type string false No description
    »»» id integer false No description
    »» parent_path string false Absolute path that corresponds to the parent of this tree node.
    »» path string false Absolute path that corresponds to this tree node.
    »» target_entities object false Seed for a CRUD query to get the target entities associated to the tree node.
    »»» type string false Type of entity for the CRUD query.
    »»» additional_filter_presets [object] false Should be used as is in the CRUD query.
    »»»» preset_name string false It uses a special 'NAV_ENTRIES' preset to build a request and retrieve the proper entities.
    »»»» path string false Absolute path that corresponds to this tree node.
    »»»» seed object false Seed entity field which indicates the schema used by the provided path.
    »»»»» type string false No description
    »»»»» field string false No description
    »»»» has_children boolean false Indicates if this node has children nodes.
    »»»» children [HierarchyExpandResponse] false When present, contains all the children of this node.

    HierarchySearchRequest

    {
      "root_path": "string",
      "search_criteria": {
        "search_string": "string",
        "entity": {
          "type": "string",
          "id": 0
        }
      },
      "seed_entity_field": "string"
    }
    

    Properties

    Name Type Required Description
    root_path string false Path from which the search should start. If not specified, all projects are searched.
    search_criteria object true This object must contain only one of the properties below.
    » search_string string false String used to search the name of all entities.
    » entity object false Entity reference used to filter entities.
    »» type string true The type of the corresponding entity.
    »» id integer true The id of the corresponding entity.
    » seed_entity_field string false Indicates the schema to use for the provided path. This seed is expected to be an 'entity' field.

    HierarchySearchResponse

    {
      "data": [
        {
          "label": "string",
          "incremental_path": [
            "string"
          ],
          "path_label": "string",
          "ref": {
            "id": 0,
            "type": "string"
          },
          "project_id": 0
        }
      ]
    }
    

    Properties

    Name Type Required Description
    data [object] false An array of found entries.
    » label string false Name of the corresponding entity.
    » incremental_path [string] false Each string of the array corresponds to a path to use with the nav_expand function to dig through the tree.
    » path_label string false Path label to be used in the client UI.
    » ref object false Reference to the corresponding entity.
    »» id integer false The id of the corresponding entity.
    »» type string false The type of the corresponding entity.
    » project_id integer false Project of the entity.

    UploadInfoResponse

    {
      "data": {
        "timestamp": "2018-04-16T21:42:13Z",
        "upload_type": "Thumbanil",
        "upload_id": null,
        "storage_service": "sg",
        "original_filename": "logo.png",
        "multipart_upload": false
      },
      "links": {
        "upload": "/api/v1/entity/projects/86/image/_upload?filename=logo.png&signature=OaHsK%2BrkZk5w1GxgxI3aNmJ0H3Y%3D",
        "complete_upload": "/api/v1/entity/projects/86/image/_upload"
      }
    }
    

    Properties

    Name Type Required Description
    data object false No description
    » timestamp string false The ISO 8601 timestamp of this request. Used in the complete request to set the created_at value of the upload.
    » upload_type string false The type of upload that the server has determined this request is for.
    » upload_id string false A unique identifier for the upload. This will be set for 's3' uploads but for 'sg' uploads the value will be provided after the file is uploaded.
    » storage_service string false The location of there the file will be uploaded. 'sg' is the Shotgun Application server. 's3' is Amazon AWS S3.
    » original_filename string false The original filename that was provided in the request.
    » multipart_upload boolean false Indicates if the upload is a multi-part upload. This is only supported for 's3' uploads.
    links object false No description
    » upload string false The URL that should be used to upload the file. A 'PUT' request should be made to this URL will the body of the request being the file data.
    » complete_upload string false The URL that should be used to complete the upload after the file has been uploaded. This is a 'POST' and the body should contain the data returned by this request.
    » get_next_part string false This URL is used for getting the next upload URL when working with multi-part uploads. The key will only exist if 'multipart_upload' is true.

    Enumerated Values

    Property Value
    upload_type Attachment
    upload_type Thumbnail
    storage_service sg
    storage_service s3

    UploadResponse

    {
      "data": {
        "upload_id": "2a36e9b8-419f-11e8-ac9f-0242ac190005",
        "original_filename": "logo.png"
      },
      "links": {
        "complete_upload": "/api/v1/entity/projects/86/image/_upload"
      }
    }
    

    Properties

    Name Type Required Description
    data object false No description
    » upload_id string false A unique identifier for the upload.
    » original_filename string false The original filename that was provided in the request.
    links object false No description
    » complete_upload string false The URL that should be used to complete the upload after the file has been uploaded. This is a 'POST' and the body should contain the data returned by this request and the GET upload url request.