NAV Navbar
Shell HTTP JavaScript Ruby Python PHP Java Go
  • Flow Production Tracking REST API v1.x
  • Authentication
  • Making Requests
  • Handling Responses
  • Get Flow Production Tracking Server Info
  • Get OpenAPI Spec
  • Access Entity Data
  • Get Access Tokens
  • Uploading and Downloading Files
  • Access Schema data
  • Access Hierarchy Data
  • Access Preferences
  • Access Webhooks
  • Access Subscriptions
  • Access License Info
  • Access Schedule
  • Object Definitions
  • Flow Production Tracking REST API v1.x

    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 Flow Production Tracking's REST API.

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

    If you are accessing Flow Production Tracking from Python, you could also use our Python API.

    Getting started video

    Setting up a development environment

    Setting up Postman

    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 Flow Production Tracking 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 Flow Production Tracking REST API v1.x in your collections.

      New Collection
    3. To connect to Flow Production Tracking, 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 Flow Production Tracking 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

    Postman Pre-request script

    Select JavaScript at the top.
    
    /*
    Varibles required:
    host - the URL for the server
    grant_type - the OAuth2 grant type being used
    
    Grant type: password
    username - the username to login with
    password - the password for the username
    
    Grant type: client_credentials
    script_name - the api script name to use
    script_key - the api script key for the script_name
    */
    
    function get_access_token(grant_type){
        var body = 'grant_type=' + grant_type
    
        if(grant_type == 'password'){
            body += '&username=' + pm.environment.get("login")
                 + '&password=' + pm.environment.get("password");
        }else if(grant_type == 'client_credentials'){
            body += '&client_id=' + pm.environment.get("script_name")
                 + '&client_secret=' + pm.environment.get("script_key");
        }else if(grant_type == 'refresh_token'){
            body += '&refresh_token=' + pm.environment.get("refresh_token");
        }
    
        auth_request(body);
    }
    
    function auth_request(body) {
         pm.sendRequest({
            url: pm.environment.get("host") + '/api/v1.1/auth/access_token',
            method: 'POST',
            header: {
                'Content-Type': 'application/x-www-form-urlencoded',
                'Accept': 'application/json'
            },
            body: {
                mode: 'raw',
                raw: body
            }
        }, function (err, res) {
            if (err) { console.log(err); }
            pm.environment.set("access_token", res.json().access_token);
            pm.environment.set("refresh_token", res.json().refresh_token);
            pm.environment.set("access_expires_at", Date.now() + res.json().expires_in*1000);
            pm.environment.set("refresh_expires_at", Date.now() + 24*60*60*1000);
        });
    }
    
    console.log('Grant Type: ' + pm.environment.get("grant_type"));
    if(pm.environment.get("access_expires_at") == null) {
        console.log('No Token');
        get_access_token(pm.environment.get('grant_type'));
    } else if(pm.environment.get("access_expires_at") <= Date.now()) {
        console.log('Access Expired');
        if (pm.environment.get("refresh_expires_at") <= Date.now()) {
            console.log('Refresh Expired');
            get_access_token(pm.environment.get('grant_type'));
        } else {
            console.log('Using Refresh token');
            get_access_token('refresh_token');
        }
    }
    

    Postman Pre-request script

    Postman's built-in authorization system doesn't support refresh tokens currently so we have built a Postman "Pre-request Script" to help with this. The script to right (click javascript at the top to see it) can be added to the collection (recommended) or request Pre-request Script tab and it will manage and refresh your access_token when needed.

    1. Copy the script to your collection (recommended) or request Pre-request Script tab.
    2. Add the variable grant_type with the value password (if following the instructions above) to your Postman environment.
    3. Change the authorization type shown in step 7 (above) from OAuth 2.0 to Bearer Token and set the token value to {{access_token}}.
    4. Make a request to your Flow Production Tracking server. The pre-script will get or renew your access_token for you and the request will be made.

    Versions and Changelog

    Flow Production Tracking's REST API has only one major version. All minor versions are backwards compatible with the base version. The current version is v1.1. We have introduced a new minor version (v1.1) to fix 2 known issues in the previous version, without introducing breaking changes. All the documentation in this file is for the latest version of the API, differences between versions they will be noted in the documentation.

    Version 1 (v1)

    The base version of our REST API. It is 100% compatible with the latest version of the API, meaning all the examples in this documentation will work with the /api/v1 URL.

    Version 1.1 (v1.1)

    The latest version of our REST API. This version id used in all the examples throughout this documentation. It was introduced to fix 2 known issues in the previous version, without introducing breaking changes.

    Authentication

    The Flow Production Tracking 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 Flow Production Tracking 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.1/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.1/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.1/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 Password Request (with Flow Production Tracking Two-Factor Authentication enabled on the site)

    The auth_token is obtained from the Google Authenticator app or Duo Mobile app on the user's smartphone.

    curl -X POST https://yoursite.shotgunstudio.com/api/v1.1/auth/access_token \
      -H 'Content-Type: application/x-www-form-urlencoded' \
      -H 'Accept: application/json' \
      -d "username={user_login}&password={user_password}&auth_token={2fa_token}&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
    auth_token body string true if 2FA enabled The one-time token generated for 2 factor authentication
    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.1/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 Flow Production Tracking 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 http://localhost:8888/api/v1.1/auth/access_token \
      -H 'Content-Type: application/x-www-form-urlencoded' \
      -H 'Accept: application/json' \
      -d "refresh_token={refresh_token}&grant_type=refresh_token"
    

    Example response

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

    The grant type refresh_token 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_token

    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.1/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.1/entity/projects/1"
        }
      },
      "links": {
        "self": "/api/v1.1/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 GET https://yoursite.shotgunstudio.com/api/v1.1/entity/assets?filter[sg_status_list]=ip&filter[sg_asset_type]=Prop \
      -H 'Authorization: Bearer <token>' \
      -H 'Accept: application/json'
    
      curl -X GET https://yoursite.shotgunstudio.com/api/v1.1/entity/assets?filter[sg_status_list]=ip&filter[sg_asset_type]=Prop,Character,Environment&filter[shots.Shot.code]=bunny_010_0020 \
      -H 'Authorization: Bearer <token>' \
      -H 'Accept: application/json'
    

    In Flow Production Tracking 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

    Flow Production Tracking 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 Flow Production Tracking 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 # Flow Production Tracking entity type
    'type_is_not' [string] | None # Flow Production Tracking 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

    Flow Production Tracking 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,
        }
      ]
    }
    

    Updating a multi-entity field

    There are two ways to update a multi-entity field. You can either specify a new list of entities or you can use a multi-entity update mode to add, remove or set one or more entities on the field. In the following examples, users is a multi-entity field that accepts a list of HumanUser entity hashes.

    Note that you can use the multi-entity update modes during a batch update as well.

    Simple assignment example (setting users to [436, 536])

    {
      "users": [
          {
              "type": "HumanUser",
              "id": 436
          },
          {
              "type": "HumanUser",
              "id": 536
          }
      ]
    }
    

    Add multi-entity update mode example (adding users [574, 538] to the field)

    {
      "users": {
        "multi_entity_update_mode": "add",
        "value": [
          {
              "type": "HumanUser",
              "id": 574
          },
          {
              "type": "HumanUser",
              "id": 538
          }
        ]
      }
    }
    

    Remove multi-entity update mode example (removing users [103, 203] from the field)

    {
      "users": {
        "multi_entity_update_mode": "remove",
        "value": [
          {
              "type": "HumanUser",
              "id": 103
          },
          {
              "type": "HumanUser",
              "id": 203
          }
        ]
      }
    }
    

    Set multi-entity update mode example (setting users to [436, 536])

    {
      "users": {
        "multi_entity_update_mode": "set",
        "value": [
          {
              "type": "HumanUser",
              "id": 436
          },
          {
              "type": "HumanUser",
              "id": 536
          }
        ]
      }
    }
    

    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. Interpreting image field strings
    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

    Localization

    Example using header:

    curl -X GET \
      http://yoursite.shotgunstudio.com/api/v1.1/schema?locale=auto \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}' \
      -H 'Locale: auto'
    
    GET https://yoursite.shotgunstudio.com/api/v1.1/schema HTTP/1.1
    Host: yoursite.shotgunstudio.com
    Locale: auto
    Accept: application/json
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}',
      'Locale':'auto'
    };
    
    $.ajax({
      url: 'https://yoursite.shotgunstudio.com/api/v1.1/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}',
      'Locale':'auto'
    };
    
    fetch('https://yoursite.shotgunstudio.com/api/v1.1/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}',
      'Locale' => 'auto'
    }
    
    result = RestClient.get 'https://yoursite.shotgunstudio.com/api/v1.1/schema', headers
    
    p JSON.parse(result)
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}',
      'Locale', 'auto'
    }
    
    r = requests.get('https://yoursite.shotgunstudio.com/api/v1.1/schema', params = {}, headers = headers)
    
    print r.json()
    

    Example using URL parameter:

    curl -X GET   http://yoursite.shotgunstudio.com/api/v1.1/schema?locale=auto \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    GET https://yoursite.shotgunstudio.com/api/v1.1/schema?locale=auto HTTP/1.1
    Host: yoursite.shotgunstudio.com
    Accept: application/json
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    };
    
    $.ajax({
      url: 'https://yoursite.shotgunstudio.com/api/v1.1/schema?locale=auto',
      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.1/schema?locale=auto',
    {
      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.1/schema?locale=auto', headers
    
    p JSON.parse(result)
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.get('https://yoursite.shotgunstudio.com/api/v1.1/schema?locale=auto', params = {}, headers = headers)
    
    print r.json()
    

    The Flow Production Tracking API offers the ability to return localized display names in the current user's language. Requests made from script/API users are localized in the site settings.

    This functionality is currently supported by the following methods:

    Localization is disabled by default. Localization on the REST API v1 can be enabled either by using the Locale header with the value auto or using the url parameter locale with the value auto.

    Interpreting image field strings

    Value Description
    null indicates no thumbnail image uploaded, or thumbnail generation has failed.
    <protocol>://<domain>/images/status/transient/thumbnail_pending.png URLs of this form indicate a transient placeholder icon. Returned when image is requested after upload, but before thumbnail has been created and made available on S3. Constant string per site.
    signed URL for S3 object Provides access to final processed thumbnail. Returned after transcoding is complete and media is available on S3.

    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.1/entity/projects/1"
        }
      },
      "errors": [],
      "links": {
        "self": "/api/v1.1/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": "Flow Production Tracking Support",
          "type": "HumanUser"
        }
      },
      "links": {
        "self": "/api/v1.1/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 Flow Production Tracking field names.
    relationships object This objects contains fields that are Entity or Multi-Entity relations. The keys of the object are the Flow Production Tracking 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 Flow Production Tracking 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.

    Get Flow Production Tracking Server Info

    Get Info

    Code samples

    # You can also use wget
    curl -X GET https://shotgunlocalhost.com/api/v1.1/ \
      -H 'Accept: application/json'
    
    
    GET https://shotgunlocalhost.com/api/v1.1/ HTTP/1.1
    Host: shotgunlocalhost.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json'
    
    };
    
    $.ajax({
      url: 'https://shotgunlocalhost.com/api/v1.1/',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'params' => {
      }
    }
    
    result = RestClient.get 'https://shotgunlocalhost.com/api/v1.1/',
      headers 
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json'
    }
    
    r = requests.get('https://shotgunlocalhost.com/api/v1.1/', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    <?php
    
    require 'vendor/autoload.php';
    
    $headers = array(
        'Accept' => 'application/json',
    );
    
    $client = new \GuzzleHttp\Client();
    
    // Define array of request body.
    $request_body = array();
    
    try {
        $response = $client->request('GET','https://shotgunlocalhost.com/api/v1.1/', array(
            'headers' => $headers,
            'json' => $request_body,
           )
        );
        print_r($response->getBody()->getContents());
     }
     catch (\GuzzleHttp\Exception\BadResponseException $e) {
        // handle exception or api errors.
        print_r($e->getMessage());
     }
    
     // ...
    
    
    URL obj = new URL("https://shotgunlocalhost.com/api/v1.1/");
    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"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://shotgunlocalhost.com/api/v1.1/", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /

    The endpoint provides version information about the Flow Production Tracking server and the REST API.

    Example responses

    200 undefined

    {
      "data": {
        "shotgun_version": "v7.8.0.0",
        "api_version": "v1"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK API and Flow Production Tracking version have been retrieved. Inline

    Response Schema

    Status Code 200

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

    Get OpenAPI Spec

    Endpoints for generating this file.

    OpenAPI v3 Spec

    Code samples

    # You can also use wget
    curl -X GET https://shotgunlocalhost.com/api/v1.1/spec.{format} \
      -H 'Accept: application/json'
    
    
    GET https://shotgunlocalhost.com/api/v1.1/spec.{format} HTTP/1.1
    Host: shotgunlocalhost.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json'
    
    };
    
    $.ajax({
      url: 'https://shotgunlocalhost.com/api/v1.1/spec.{format}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'params' => {
      }
    }
    
    result = RestClient.get 'https://shotgunlocalhost.com/api/v1.1/spec.{format}',
      headers 
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json'
    }
    
    r = requests.get('https://shotgunlocalhost.com/api/v1.1/spec.{format}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    <?php
    
    require 'vendor/autoload.php';
    
    $headers = array(
        'Accept' => 'application/json',
    );
    
    $client = new \GuzzleHttp\Client();
    
    // Define array of request body.
    $request_body = array();
    
    try {
        $response = $client->request('GET','https://shotgunlocalhost.com/api/v1.1/spec.{format}', array(
            'headers' => $headers,
            'json' => $request_body,
           )
        );
        print_r($response->getBody()->getContents());
     }
     catch (\GuzzleHttp\Exception\BadResponseException $e) {
        // handle exception or api errors.
        print_r($e->getMessage());
     }
    
     // ...
    
    
    URL obj = new URL("https://shotgunlocalhost.com/api/v1.1/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"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://shotgunlocalhost.com/api/v1.1/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

    {
      "openapi": "3.0.0",
      "info": {
        "title": "Flow Production Tracking REST API",
        "description": "Flow Production Tracking REST API Docs",
        "version": "1 (beta)"
      },
      "servers": {},
      "components": {},
      "paths": {}
    }
    

    Responses

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

    Response Schema

    Status Code 200

    Name Type Required Description

    Access Entity Data

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

    Read all records

    Code samples

    # You can also use wget
    curl -X GET https://shotgunlocalhost.com/api/v1.1/entity/{entity} \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    GET https://shotgunlocalhost.com/api/v1.1/entity/{entity} HTTP/1.1
    Host: shotgunlocalhost.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://shotgunlocalhost.com/api/v1.1/entity/{entity}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}',
      'params' => {
      }
    }
    
    result = RestClient.get 'https://shotgunlocalhost.com/api/v1.1/entity/{entity}',
      headers 
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.get('https://shotgunlocalhost.com/api/v1.1/entity/{entity}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    <?php
    
    require 'vendor/autoload.php';
    
    $headers = array(
        'Accept' => 'application/json',
        'Authorization' => 'Bearer {access-token}',
    );
    
    $client = new \GuzzleHttp\Client();
    
    // Define array of request body.
    $request_body = array();
    
    try {
        $response = $client->request('GET','https://shotgunlocalhost.com/api/v1.1/entity/{entity}', array(
            'headers' => $headers,
            'json' => $request_body,
           )
        );
        print_r($response->getBody()->getContents());
     }
     catch (\GuzzleHttp\Exception\BadResponseException $e) {
        // handle exception or api errors.
        print_r($e->getMessage());
     }
    
     // ...
    
    
    URL obj = new URL("https://shotgunlocalhost.com/api/v1.1/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://shotgunlocalhost.com/api/v1.1/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": "Flow Production Tracking Support",
              "type": "HumanUser"
            }
          },
          "links": {
            "self": "/api/v1.1/projects/82"
          }
        }
      ],
      "links": {
        "self": "/api/v1.1/projects?page%5Bnumber%5D=2&page%5Bsize%5D=500",
        "next": "/api/v1.1/projects?page%5Bnumber%5D=3&page%5Bsize%5D=500",
        "prev": "/api/v1.1/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://shotgunlocalhost.com/api/v1.1/entity/{entity} \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    POST https://shotgunlocalhost.com/api/v1.1/entity/{entity} HTTP/1.1
    Host: shotgunlocalhost.com
    Content-Type: application/json
    Accept: application/json
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://shotgunlocalhost.com/api/v1.1/entity/{entity}',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}',
      'params' => {
      }
    }
    
    body = {
    }
    
    result = RestClient.post 'https://shotgunlocalhost.com/api/v1.1/entity/{entity}',
      body,
      headers 
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.post('https://shotgunlocalhost.com/api/v1.1/entity/{entity}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    <?php
    
    require 'vendor/autoload.php';
    
    $headers = array(
        'Content-Type' => 'application/json',
        'Accept' => 'application/json',
        'Authorization' => 'Bearer {access-token}',
    );
    
    $client = new \GuzzleHttp\Client();
    
    // Define array of request body.
    $request_body = array();
    
    try {
        $response = $client->request('POST','https://shotgunlocalhost.com/api/v1.1/entity/{entity}', array(
            'headers' => $headers,
            'json' => $request_body,
           )
        );
        print_r($response->getBody()->getContents());
     }
     catch (\GuzzleHttp\Exception\BadResponseException $e) {
        // handle exception or api errors.
        print_r($e->getMessage());
     }
    
     // ...
    
    
    URL obj = new URL("https://shotgunlocalhost.com/api/v1.1/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://shotgunlocalhost.com/api/v1.1/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.
    options query ReturnFieldsOptionsParameter false Optional settings for the request. Hash of different configuration options. Ex. options[fields]=code,project
    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 Flow Production Tracking 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.1/entity/projects/82/relationships/users"
            }
          },
          "layout_project": {
            "data": {
              "id": 70,
              "name": "Demo: Animation",
              "type": "Project"
            },
            "links": {
              "self": "/api/v1.1/entity/projects/82/relationships/layout_project",
              "related": "/api/v1.1/entity/projects/70"
            }
          },
          "phases": {
            "data": [],
            "links": {
              "self": "/api/v1.1/entity/projects/82/relationships/phases"
            }
          },
          "created_by": {
            "data": {
              "id": 24,
              "name": "Flow Production Tracking Support",
              "type": "HumanUser"
            },
            "links": {
              "self": "/api/v1.1/entity/projects/82/relationships/created_by",
              "related": "/api/v1.1/entity/human_users/24"
            }
          },
          "updated_by": {
            "data": {
              "id": 24,
              "name": "Flow Production Tracking Support",
              "type": "HumanUser"
            },
            "links": {
              "self": "/api/v1.1/entity/projects/82/relationships/updated_by",
              "related": "/api/v1.1/entity/human_users/24"
            }
          },
          "tags": {
            "data": [],
            "links": {
              "self": "/api/v1.1/entity/projects/82/relationships/tags"
            }
          },
          "task_templates": {
            "data": [],
            "links": {
              "self": "/api/v1.1/entity/projects/82/relationships/task_templates"
            }
          }
        },
        "id": 82,
        "links": {
          "self": "/api/v1.1/entity/projects/82"
        }
      },
      "links": {
        "self": "/api/v1.1/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://shotgunlocalhost.com/api/v1.1/entity/_batch \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    POST https://shotgunlocalhost.com/api/v1.1/entity/_batch HTTP/1.1
    Host: shotgunlocalhost.com
    Content-Type: application/json
    Accept: application/json
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://shotgunlocalhost.com/api/v1.1/entity/_batch',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}',
      'params' => {
      }
    }
    
    body = {
    }
    
    result = RestClient.post 'https://shotgunlocalhost.com/api/v1.1/entity/_batch',
      body,
      headers 
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.post('https://shotgunlocalhost.com/api/v1.1/entity/_batch', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    <?php
    
    require 'vendor/autoload.php';
    
    $headers = array(
        'Content-Type' => 'application/json',
        'Accept' => 'application/json',
        'Authorization' => 'Bearer {access-token}',
    );
    
    $client = new \GuzzleHttp\Client();
    
    // Define array of request body.
    $request_body = array();
    
    try {
        $response = $client->request('POST','https://shotgunlocalhost.com/api/v1.1/entity/_batch', array(
            'headers' => $headers,
            'json' => $request_body,
           )
        );
        print_r($response->getBody()->getContents());
     }
     catch (\GuzzleHttp\Exception\BadResponseException $e) {
        // handle exception or api errors.
        print_r($e->getMessage());
     }
    
     // ...
    
    
    URL obj = new URL("https://shotgunlocalhost.com/api/v1.1/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://shotgunlocalhost.com/api/v1.1/entity/_batch", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /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"
          },
          "options": {
            "fields": [
              "code"
            ]
          }
        }
      ]
    }
    

    Parameters

    Parameter In Type Required Description
    body body object true The body should contain an array of requests to be batch executed.
    » requests body [object] false No description
    »» 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.
    »» options body BatchReturnFieldsOptionsParameter false Optional parameters for the create request type.
    »»» fields body [string] false List of fields to return. If * is specified, all fields will be returned. If the value is set to an empty array (i.e. []), no fields will be returned.
    »» 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": [
        {
          "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": "Flow Production Tracking Support",
              "type": "HumanUser"
            }
          },
          "links": {
            "self": "/api/v1.1/projects/82"
          }
        }
      ]
    }
    

    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://shotgunlocalhost.com/api/v1.1/entity/{entity}/_search \
      -H 'Content-Type: application/vnd+shotgun.api3_array+json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    POST https://shotgunlocalhost.com/api/v1.1/entity/{entity}/_search HTTP/1.1
    Host: shotgunlocalhost.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://shotgunlocalhost.com/api/v1.1/entity/{entity}/_search',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/vnd+shotgun.api3_array+json',
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}',
      'params' => {
      }
    }
    
    body = {
    }
    
    result = RestClient.post 'https://shotgunlocalhost.com/api/v1.1/entity/{entity}/_search',
      body,
      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://shotgunlocalhost.com/api/v1.1/entity/{entity}/_search', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    <?php
    
    require 'vendor/autoload.php';
    
    $headers = array(
        'Content-Type' => 'application/vnd+shotgun.api3_array+json',
        'Accept' => 'application/json',
        'Authorization' => 'Bearer {access-token}',
    );
    
    $client = new \GuzzleHttp\Client();
    
    // Define array of request body.
    $request_body = array();
    
    try {
        $response = $client->request('POST','https://shotgunlocalhost.com/api/v1.1/entity/{entity}/_search', array(
            'headers' => $headers,
            'json' => $request_body,
           )
        );
        print_r($response->getBody()->getContents());
     }
     catch (\GuzzleHttp\Exception\BadResponseException $e) {
        // handle exception or api errors.
        print_r($e->getMessage());
     }
    
     // ...
    
    
    URL obj = new URL("https://shotgunlocalhost.com/api/v1.1/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://shotgunlocalhost.com/api/v1.1/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": [
        [
          "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 [This is a 3 item array that contains: [<field>, <relation>, <value(s)>]']
    »»» 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 [This is a 3 item array that contains: [<field>, <relation>, <value(s)>]']
    »» 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": "Flow Production Tracking Support",
              "type": "HumanUser"
            }
          },
          "links": {
            "self": "/api/v1.1/projects/82"
          }
        }
      ],
      "links": {
        "self": "/api/v1.1/projects?page%5Bnumber%5D=2&page%5Bsize%5D=500",
        "next": "/api/v1.1/projects?page%5Bnumber%5D=3&page%5Bsize%5D=500",
        "prev": "/api/v1.1/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://shotgunlocalhost.com/api/v1.1/entity/_text_search \
      -H 'Content-Type: application/vnd+shotgun.api3_array+json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    POST https://shotgunlocalhost.com/api/v1.1/entity/_text_search HTTP/1.1
    Host: shotgunlocalhost.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://shotgunlocalhost.com/api/v1.1/entity/_text_search',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/vnd+shotgun.api3_array+json',
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}',
      'params' => {
      }
    }
    
    body = {
    }
    
    result = RestClient.post 'https://shotgunlocalhost.com/api/v1.1/entity/_text_search',
      body,
      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://shotgunlocalhost.com/api/v1.1/entity/_text_search', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    <?php
    
    require 'vendor/autoload.php';
    
    $headers = array(
        'Content-Type' => 'application/vnd+shotgun.api3_array+json',
        'Accept' => 'application/json',
        'Authorization' => 'Bearer {access-token}',
    );
    
    $client = new \GuzzleHttp\Client();
    
    // Define array of request body.
    $request_body = array();
    
    try {
        $response = $client->request('POST','https://shotgunlocalhost.com/api/v1.1/entity/_text_search', array(
            'headers' => $headers,
            'json' => $request_body,
           )
        );
        print_r($response->getBody()->getContents());
     }
     catch (\GuzzleHttp\Exception\BadResponseException $e) {
        // handle exception or api errors.
        print_r($e->getMessage());
     }
    
     // ...
    
    
    URL obj = new URL("https://shotgunlocalhost.com/api/v1.1/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://shotgunlocalhost.com/api/v1.1/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": [
          [
            "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. All filters must be in the same format for a single request.
    »» anonymous body [FilterCondition] false [This is a 3 item array that contains: [<field>, <relation>, <value(s)>]']
    »»» 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 [This is a 3 item array that contains: [<field>, <relation>, <value(s)>]']
    »» 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 Flow Production Tracking.
    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": "Flow Production Tracking Support",
              "type": "HumanUser"
            }
          },
          "links": {
            "self": "/api/v1.1/projects/82"
          }
        }
      ],
      "links": {
        "self": "/api/v1.1/projects?page%5Bnumber%5D=2&page%5Bsize%5D=500",
        "next": "/api/v1.1/projects?page%5Bnumber%5D=3&page%5Bsize%5D=500",
        "prev": "/api/v1.1/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://shotgunlocalhost.com/api/v1.1/entity/{entity}/_summarize \
      -H 'Content-Type: application/vnd+shotgun.api3_array+json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    POST https://shotgunlocalhost.com/api/v1.1/entity/{entity}/_summarize HTTP/1.1
    Host: shotgunlocalhost.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://shotgunlocalhost.com/api/v1.1/entity/{entity}/_summarize',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/vnd+shotgun.api3_array+json',
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}',
      'params' => {
      }
    }
    
    body = {
    }
    
    result = RestClient.post 'https://shotgunlocalhost.com/api/v1.1/entity/{entity}/_summarize',
      body,
      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://shotgunlocalhost.com/api/v1.1/entity/{entity}/_summarize', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    <?php
    
    require 'vendor/autoload.php';
    
    $headers = array(
        'Content-Type' => 'application/vnd+shotgun.api3_array+json',
        'Accept' => 'application/json',
        'Authorization' => 'Bearer {access-token}',
    );
    
    $client = new \GuzzleHttp\Client();
    
    // Define array of request body.
    $request_body = array();
    
    try {
        $response = $client->request('POST','https://shotgunlocalhost.com/api/v1.1/entity/{entity}/_summarize', array(
            'headers' => $headers,
            'json' => $request_body,
           )
        );
        print_r($response->getBody()->getContents());
     }
     catch (\GuzzleHttp\Exception\BadResponseException $e) {
        // handle exception or api errors.
        print_r($e->getMessage());
     }
    
     // ...
    
    
    URL obj = new URL("https://shotgunlocalhost.com/api/v1.1/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://shotgunlocalhost.com/api/v1.1/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 [This is a 3 item array that contains: [<field>, <relation>, <value(s)>]']
    »»» 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 [This is a 3 item array that contains: [<field>, <relation>, <value(s)>]']
    »» 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_percentage_as_float
    »» 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://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id} \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    GET https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id} HTTP/1.1
    Host: shotgunlocalhost.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}',
      'params' => {
      }
    }
    
    result = RestClient.get 'https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}',
      headers 
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.get('https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    <?php
    
    require 'vendor/autoload.php';
    
    $headers = array(
        'Accept' => 'application/json',
        'Authorization' => 'Bearer {access-token}',
    );
    
    $client = new \GuzzleHttp\Client();
    
    // Define array of request body.
    $request_body = array();
    
    try {
        $response = $client->request('GET','https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}', array(
            'headers' => $headers,
            'json' => $request_body,
           )
        );
        print_r($response->getBody()->getContents());
     }
     catch (\GuzzleHttp\Exception\BadResponseException $e) {
        // handle exception or api errors.
        print_r($e->getMessage());
     }
    
     // ...
    
    
    URL obj = new URL("https://shotgunlocalhost.com/api/v1.1/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://shotgunlocalhost.com/api/v1.1/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.1/entity/projects/82/relationships/users"
            }
          },
          "layout_project": {
            "data": {
              "id": 70,
              "name": "Demo: Animation",
              "type": "Project"
            },
            "links": {
              "self": "/api/v1.1/entity/projects/82/relationships/layout_project",
              "related": "/api/v1.1/entity/projects/70"
            }
          },
          "phases": {
            "data": [],
            "links": {
              "self": "/api/v1.1/entity/projects/82/relationships/phases"
            }
          },
          "created_by": {
            "data": {
              "id": 24,
              "name": "Flow Production Tracking Support",
              "type": "HumanUser"
            },
            "links": {
              "self": "/api/v1.1/entity/projects/82/relationships/created_by",
              "related": "/api/v1.1/entity/human_users/24"
            }
          },
          "updated_by": {
            "data": {
              "id": 24,
              "name": "Flow Production Tracking Support",
              "type": "HumanUser"
            },
            "links": {
              "self": "/api/v1.1/entity/projects/82/relationships/updated_by",
              "related": "/api/v1.1/entity/human_users/24"
            }
          },
          "tags": {
            "data": [],
            "links": {
              "self": "/api/v1.1/entity/projects/82/relationships/tags"
            }
          },
          "task_templates": {
            "data": [],
            "links": {
              "self": "/api/v1.1/entity/projects/82/relationships/task_templates"
            }
          }
        },
        "id": 82,
        "links": {
          "self": "/api/v1.1/entity/projects/82"
        }
      },
      "links": {
        "self": "/api/v1.1/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://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id} \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    PUT https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id} HTTP/1.1
    Host: shotgunlocalhost.com
    Content-Type: application/json
    Accept: application/json
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}',
      method: 'put',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}',
      'params' => {
      }
    }
    
    body = {
    }
    
    result = RestClient.put 'https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}',
      body,
      headers 
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.put('https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    <?php
    
    require 'vendor/autoload.php';
    
    $headers = array(
        'Content-Type' => 'application/json',
        'Accept' => 'application/json',
        'Authorization' => 'Bearer {access-token}',
    );
    
    $client = new \GuzzleHttp\Client();
    
    // Define array of request body.
    $request_body = array();
    
    try {
        $response = $client->request('PUT','https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}', array(
            'headers' => $headers,
            'json' => $request_body,
           )
        );
        print_r($response->getBody()->getContents());
     }
     catch (\GuzzleHttp\Exception\BadResponseException $e) {
        // handle exception or api errors.
        print_r($e->getMessage());
     }
    
     // ...
    
    
    URL obj = new URL("https://shotgunlocalhost.com/api/v1.1/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://shotgunlocalhost.com/api/v1.1/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. For more information on updating a multi-entity field with this endpoint, see the multi-enity update section.

    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.
    options query ReturnFieldsOptionsParameter false Optional settings for the request. Hash of different configuration options. Ex. options[fields]=code,project
    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 Flow Production Tracking 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.1/entity/projects/82/relationships/users"
            }
          },
          "layout_project": {
            "data": {
              "id": 70,
              "name": "Demo: Animation",
              "type": "Project"
            },
            "links": {
              "self": "/api/v1.1/entity/projects/82/relationships/layout_project",
              "related": "/api/v1.1/entity/projects/70"
            }
          },
          "phases": {
            "data": [],
            "links": {
              "self": "/api/v1.1/entity/projects/82/relationships/phases"
            }
          },
          "created_by": {
            "data": {
              "id": 24,
              "name": "Flow Production Tracking Support",
              "type": "HumanUser"
            },
            "links": {
              "self": "/api/v1.1/entity/projects/82/relationships/created_by",
              "related": "/api/v1.1/entity/human_users/24"
            }
          },
          "updated_by": {
            "data": {
              "id": 24,
              "name": "Flow Production Tracking Support",
              "type": "HumanUser"
            },
            "links": {
              "self": "/api/v1.1/entity/projects/82/relationships/updated_by",
              "related": "/api/v1.1/entity/human_users/24"
            }
          },
          "tags": {
            "data": [],
            "links": {
              "self": "/api/v1.1/entity/projects/82/relationships/tags"
            }
          },
          "task_templates": {
            "data": [],
            "links": {
              "self": "/api/v1.1/entity/projects/82/relationships/task_templates"
            }
          }
        },
        "id": 82,
        "links": {
          "self": "/api/v1.1/entity/projects/82"
        }
      },
      "links": {
        "self": "/api/v1.1/entity/projects/82"
      }
    }
    

    Responses

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

    Delete a record

    Code samples

    # You can also use wget
    curl -X DELETE https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id} \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    DELETE https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id} HTTP/1.1
    Host: shotgunlocalhost.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}',
      method: 'delete',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}',
      'params' => {
      }
    }
    
    result = RestClient.delete 'https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}',
      headers 
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.delete('https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    <?php
    
    require 'vendor/autoload.php';
    
    $headers = array(
        'Accept' => 'application/json',
        'Authorization' => 'Bearer {access-token}',
    );
    
    $client = new \GuzzleHttp\Client();
    
    // Define array of request body.
    $request_body = array();
    
    try {
        $response = $client->request('DELETE','https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}', array(
            'headers' => $headers,
            'json' => $request_body,
           )
        );
        print_r($response->getBody()->getContents());
     }
     catch (\GuzzleHttp\Exception\BadResponseException $e) {
        // handle exception or api errors.
        print_r($e->getMessage());
     }
    
     // ...
    
    
    URL obj = new URL("https://shotgunlocalhost.com/api/v1.1/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://shotgunlocalhost.com/api/v1.1/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
    404 Not Found Record does not exist. ErrorResponse

    Revive a record

    Code samples

    # You can also use wget
    curl -X POST https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}?revive=true \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    POST https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}?revive=true HTTP/1.1
    Host: shotgunlocalhost.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}',
      method: 'post',
      data: '?revive=true',
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}',
      'params' => {
        'revive' => 'boolean'
      }
    }
    
    result = RestClient.post 'https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}', nil,
      headers 
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.post('https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}', params={
      'revive': 'true'
    }, headers = headers)
    
    print r.json()
    
    
    <?php
    
    require 'vendor/autoload.php';
    
    $headers = array(
        'Accept' => 'application/json',
        'Authorization' => 'Bearer {access-token}',
    );
    
    $client = new \GuzzleHttp\Client();
    
    // Define array of request body.
    $request_body = array();
    
    try {
        $response = $client->request('POST','https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}', array(
            'headers' => $headers,
            'json' => $request_body,
           )
        );
        print_r($response->getBody()->getContents());
     }
     catch (\GuzzleHttp\Exception\BadResponseException $e) {
        // handle exception or api errors.
        print_r($e->getMessage());
     }
    
     // ...
    
    
    URL obj = new URL("https://shotgunlocalhost.com/api/v1.1/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://shotgunlocalhost.com/api/v1.1/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": "Flow Production Tracking Support",
            "type": "HumanUser"
          }
        },
        "links": {
          "self": "/api/v1.1/projects/82"
        }
      },
      "links": {
        "self": "/api/v1.1/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
    404 Not Found Record does not exist. 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://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/relationships/{related_field} \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    GET https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/relationships/{related_field} HTTP/1.1
    Host: shotgunlocalhost.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/relationships/{related_field}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}',
      'params' => {
      }
    }
    
    result = RestClient.get 'https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/relationships/{related_field}',
      headers 
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.get('https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/relationships/{related_field}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    <?php
    
    require 'vendor/autoload.php';
    
    $headers = array(
        'Accept' => 'application/json',
        'Authorization' => 'Bearer {access-token}',
    );
    
    $client = new \GuzzleHttp\Client();
    
    // Define array of request body.
    $request_body = array();
    
    try {
        $response = $client->request('GET','https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/relationships/{related_field}', array(
            'headers' => $headers,
            'json' => $request_body,
           )
        );
        print_r($response->getBody()->getContents());
     }
     catch (\GuzzleHttp\Exception\BadResponseException $e) {
        // handle exception or api errors.
        print_r($e->getMessage());
     }
    
     // ...
    
    
    URL obj = new URL("https://shotgunlocalhost.com/api/v1.1/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://shotgunlocalhost.com/api/v1.1/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 string 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": {
        "id": 24,
        "name": "Flow Production Tracking Support",
        "type": "HumanUser"
      },
      "links": {
        "self": "/api/v1.1/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

    Read the thread contents for a Note

    Code samples

    # You can also use wget
    curl -X GET https://shotgunlocalhost.com/api/v1.1/entity/notes/{record_id}/thread_contents \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    GET https://shotgunlocalhost.com/api/v1.1/entity/notes/{record_id}/thread_contents HTTP/1.1
    Host: shotgunlocalhost.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://shotgunlocalhost.com/api/v1.1/entity/notes/{record_id}/thread_contents',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}',
      'params' => {
      }
    }
    
    result = RestClient.get 'https://shotgunlocalhost.com/api/v1.1/entity/notes/{record_id}/thread_contents',
      headers 
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.get('https://shotgunlocalhost.com/api/v1.1/entity/notes/{record_id}/thread_contents', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    <?php
    
    require 'vendor/autoload.php';
    
    $headers = array(
        'Accept' => 'application/json',
        'Authorization' => 'Bearer {access-token}',
    );
    
    $client = new \GuzzleHttp\Client();
    
    // Define array of request body.
    $request_body = array();
    
    try {
        $response = $client->request('GET','https://shotgunlocalhost.com/api/v1.1/entity/notes/{record_id}/thread_contents', array(
            'headers' => $headers,
            'json' => $request_body,
           )
        );
        print_r($response->getBody()->getContents());
     }
     catch (\GuzzleHttp\Exception\BadResponseException $e) {
        // handle exception or api errors.
        print_r($e->getMessage());
     }
    
     // ...
    
    
    URL obj = new URL("https://shotgunlocalhost.com/api/v1.1/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://shotgunlocalhost.com/api/v1.1/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 parameter, all fields as well as any specified bubble 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.1/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://shotgunlocalhost.com/api/v1.1/entity/projects/{record_id}/_update_last_accessed \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    PUT https://shotgunlocalhost.com/api/v1.1/entity/projects/{record_id}/_update_last_accessed HTTP/1.1
    Host: shotgunlocalhost.com
    Content-Type: application/json
    Accept: application/json
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://shotgunlocalhost.com/api/v1.1/entity/projects/{record_id}/_update_last_accessed',
      method: 'put',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}',
      'params' => {
      }
    }
    
    body = {
    }
    
    result = RestClient.put 'https://shotgunlocalhost.com/api/v1.1/entity/projects/{record_id}/_update_last_accessed',
      body,
      headers 
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.put('https://shotgunlocalhost.com/api/v1.1/entity/projects/{record_id}/_update_last_accessed', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    <?php
    
    require 'vendor/autoload.php';
    
    $headers = array(
        'Content-Type' => 'application/json',
        'Accept' => 'application/json',
        'Authorization' => 'Bearer {access-token}',
    );
    
    $client = new \GuzzleHttp\Client();
    
    // Define array of request body.
    $request_body = array();
    
    try {
        $response = $client->request('PUT','https://shotgunlocalhost.com/api/v1.1/entity/projects/{record_id}/_update_last_accessed', array(
            'headers' => $headers,
            'json' => $request_body,
           )
        );
        print_r($response->getBody()->getContents());
     }
     catch (\GuzzleHttp\Exception\BadResponseException $e) {
        // handle exception or api errors.
        print_r($e->getMessage());
     }
    
     // ...
    
    
    URL obj = new URL("https://shotgunlocalhost.com/api/v1.1/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://shotgunlocalhost.com/api/v1.1/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.1/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://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/activity_stream \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    GET https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/activity_stream HTTP/1.1
    Host: shotgunlocalhost.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/activity_stream',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}',
      'params' => {
      }
    }
    
    result = RestClient.get 'https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/activity_stream',
      headers 
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.get('https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/activity_stream', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    <?php
    
    require 'vendor/autoload.php';
    
    $headers = array(
        'Accept' => 'application/json',
        'Authorization' => 'Bearer {access-token}',
    );
    
    $client = new \GuzzleHttp\Client();
    
    // Define array of request body.
    $request_body = array();
    
    try {
        $response = $client->request('GET','https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/activity_stream', array(
            'headers' => $headers,
            'json' => $request_body,
           )
        );
        print_r($response->getBody()->getContents());
     }
     catch (\GuzzleHttp\Exception\BadResponseException $e) {
        // handle exception or api errors.
        print_r($e->getMessage());
     }
    
     // ...
    
    
    URL obj = new URL("https://shotgunlocalhost.com/api/v1.1/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://shotgunlocalhost.com/api/v1.1/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 parameter, all fields as well as any specified bubble 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.1/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://shotgunlocalhost.com/api/v1.1/entity/human_users/{user_id}/following \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    GET https://shotgunlocalhost.com/api/v1.1/entity/human_users/{user_id}/following HTTP/1.1
    Host: shotgunlocalhost.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://shotgunlocalhost.com/api/v1.1/entity/human_users/{user_id}/following',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}',
      'params' => {
      }
    }
    
    result = RestClient.get 'https://shotgunlocalhost.com/api/v1.1/entity/human_users/{user_id}/following',
      headers 
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.get('https://shotgunlocalhost.com/api/v1.1/entity/human_users/{user_id}/following', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    <?php
    
    require 'vendor/autoload.php';
    
    $headers = array(
        'Accept' => 'application/json',
        'Authorization' => 'Bearer {access-token}',
    );
    
    $client = new \GuzzleHttp\Client();
    
    // Define array of request body.
    $request_body = array();
    
    try {
        $response = $client->request('GET','https://shotgunlocalhost.com/api/v1.1/entity/human_users/{user_id}/following', array(
            'headers' => $headers,
            'json' => $request_body,
           )
        );
        print_r($response->getBody()->getContents());
     }
     catch (\GuzzleHttp\Exception\BadResponseException $e) {
        // handle exception or api errors.
        print_r($e->getMessage());
     }
    
     // ...
    
    
    URL obj = new URL("https://shotgunlocalhost.com/api/v1.1/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://shotgunlocalhost.com/api/v1.1/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.1/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://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/followers \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    GET https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/followers HTTP/1.1
    Host: shotgunlocalhost.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/followers',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}',
      'params' => {
      }
    }
    
    result = RestClient.get 'https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/followers',
      headers 
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.get('https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/followers', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    <?php
    
    require 'vendor/autoload.php';
    
    $headers = array(
        'Accept' => 'application/json',
        'Authorization' => 'Bearer {access-token}',
    );
    
    $client = new \GuzzleHttp\Client();
    
    // Define array of request body.
    $request_body = array();
    
    try {
        $response = $client->request('GET','https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/followers', array(
            'headers' => $headers,
            'json' => $request_body,
           )
        );
        print_r($response->getBody()->getContents());
     }
     catch (\GuzzleHttp\Exception\BadResponseException $e) {
        // handle exception or api errors.
        print_r($e->getMessage());
     }
    
     // ...
    
    
    URL obj = new URL("https://shotgunlocalhost.com/api/v1.1/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://shotgunlocalhost.com/api/v1.1/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.1/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://shotgunlocalhost.com/api/v1.1/entity/human_users/{user_id}/follow \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    POST https://shotgunlocalhost.com/api/v1.1/entity/human_users/{user_id}/follow HTTP/1.1
    Host: shotgunlocalhost.com
    Content-Type: application/json
    Accept: application/json
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://shotgunlocalhost.com/api/v1.1/entity/human_users/{user_id}/follow',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}',
      'params' => {
      }
    }
    
    body = {
    }
    
    result = RestClient.post 'https://shotgunlocalhost.com/api/v1.1/entity/human_users/{user_id}/follow',
      body,
      headers 
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.post('https://shotgunlocalhost.com/api/v1.1/entity/human_users/{user_id}/follow', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    <?php
    
    require 'vendor/autoload.php';
    
    $headers = array(
        'Content-Type' => 'application/json',
        'Accept' => 'application/json',
        'Authorization' => 'Bearer {access-token}',
    );
    
    $client = new \GuzzleHttp\Client();
    
    // Define array of request body.
    $request_body = array();
    
    try {
        $response = $client->request('POST','https://shotgunlocalhost.com/api/v1.1/entity/human_users/{user_id}/follow', array(
            'headers' => $headers,
            'json' => $request_body,
           )
        );
        print_r($response->getBody()->getContents());
     }
     catch (\GuzzleHttp\Exception\BadResponseException $e) {
        // handle exception or api errors.
        print_r($e->getMessage());
     }
    
     // ...
    
    
    URL obj = new URL("https://shotgunlocalhost.com/api/v1.1/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://shotgunlocalhost.com/api/v1.1/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://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/unfollow \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    PUT https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/unfollow HTTP/1.1
    Host: shotgunlocalhost.com
    Content-Type: application/json
    Accept: application/json
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/unfollow',
      method: 'put',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}',
      'params' => {
      }
    }
    
    body = {
    }
    
    result = RestClient.put 'https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/unfollow',
      body,
      headers 
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.put('https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/unfollow', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    <?php
    
    require 'vendor/autoload.php';
    
    $headers = array(
        'Content-Type' => 'application/json',
        'Accept' => 'application/json',
        'Authorization' => 'Bearer {access-token}',
    );
    
    $client = new \GuzzleHttp\Client();
    
    // Define array of request body.
    $request_body = array();
    
    try {
        $response = $client->request('PUT','https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/unfollow', array(
            'headers' => $headers,
            'json' => $request_body,
           )
        );
        print_r($response->getBody()->getContents());
     }
     catch (\GuzzleHttp\Exception\BadResponseException $e) {
        // handle exception or api errors.
        print_r($e->getMessage());
     }
    
     // ...
    
    
    URL obj = new URL("https://shotgunlocalhost.com/api/v1.1/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://shotgunlocalhost.com/api/v1.1/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

    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://shotgunlocalhost.com/api/v1.1/auth/access_token \
      -H 'Content-Type: application/x-www-form-urlencoded' \
      -H 'Accept: application/json'
    
    
    POST https://shotgunlocalhost.com/api/v1.1/auth/access_token HTTP/1.1
    Host: shotgunlocalhost.com
    Content-Type: application/x-www-form-urlencoded
    Accept: application/json
    
    
    var headers = {
      'Content-Type':'application/x-www-form-urlencoded',
      'Accept':'application/json'
    
    };
    
    $.ajax({
      url: 'https://shotgunlocalhost.com/api/v1.1/auth/access_token',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/x-www-form-urlencoded',
      'Accept' => 'application/json',
      'params' => {
      }
    }
    
    body = {
    }
    
    result = RestClient.post 'https://shotgunlocalhost.com/api/v1.1/auth/access_token',
      body,
      headers 
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Accept': 'application/json'
    }
    
    r = requests.post('https://shotgunlocalhost.com/api/v1.1/auth/access_token', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    <?php
    
    require 'vendor/autoload.php';
    
    $headers = array(
        'Content-Type' => 'application/x-www-form-urlencoded',
        'Accept' => 'application/json',
    );
    
    $client = new \GuzzleHttp\Client();
    
    // Define array of request body.
    $request_body = array();
    
    try {
        $response = $client->request('POST','https://shotgunlocalhost.com/api/v1.1/auth/access_token', array(
            'headers' => $headers,
            'json' => $request_body,
           )
        );
        print_r($response->getBody()->getContents());
     }
     catch (\GuzzleHttp\Exception\BadResponseException $e) {
        // handle exception or api errors.
        print_r($e->getMessage());
     }
    
     // ...
    
    
    URL obj = new URL("https://shotgunlocalhost.com/api/v1.1/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"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://shotgunlocalhost.com/api/v1.1/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

    {
      "token_type": "Bearer",
      "access_token": "<access_token>",
      "expires_in": 3600,
      "refresh_token": "<refresh_token>"
    }
    

    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_token grant type to generate a new access token.

    Uploading and Downloading Files

    In the REST API uploading a files is a 3 step process, which allows for both uploads to the Flow Production Tracking application server and uploads direct to AWS S3 to look nearly identical. The 3 types are:

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

    Code samples

    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": "https://yoursite.shotgunstudio.com/api/v1.1/entity/projects/86/image/_upload?filename=sg_billboard.jpg&signature=OaHsK%2BrkZk5w1GxgxI3aNmJ0H3Y%3D&user_id=1&user_type=HumanUser&expiration=1532618412",
        "complete_upload": "/api/v1.1/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 to link to. The response includes two keys “data” and “links”. The “data” key contains information about the upload and is require to link the upload to the record or field on the record. The “links” key contains links to where the upload 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 types upload URLs will be returned. The 3 possible upload URLs are, a URL to the Flow Production Tracking application server, a pre-signed S3 upload URL, or a pre-signed S3 multi-part upload URL (for upload 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 Flow Production Tracking application server

    Flow Production Tracking app server example response

    {
    "data": {
        "upload_id": "2c099e28-3f44-11e8-a8f7-0242ac190005",
        "original_filename": "sg_billboard.jpg"
    },
    "links": {
        "complete": "/api/v1.1/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 response with a 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 is type of upload requires no extra step before making the complete upload request.

    Uploading to S3 (multi-part)

    For uploads large than 500MB S3 requires the use of multi-part uploads. When you using multi-part uploads two things are required to be done after each part is uploads. First, the "ETag" header value should be gathered and stored for later use. Second, if there is more data to upload a request will need to be made to the REST API to get 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. More info here

    Note: The minimum part size for multi-part uploads is 5MB for all parts except the last part.

    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 on of the storage services, the upload needs to be linked ot 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.

    Read file field

    Code samples

    # You can also use wget
    curl -X GET https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/{field_name} \
      -H 'Accept: application/json' \
      -H 'Range: bytes=0-100' \
      -H 'Authorization: Bearer {access-token}'
    
    
    GET https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/{field_name} HTTP/1.1
    Host: shotgunlocalhost.com
    
    Accept: application/json
    Range: bytes=0-100
    
    
    var headers = {
      'Accept':'application/json',
      'Range':'bytes=0-100',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/{field_name}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Range' => 'bytes=0-100',
      'Authorization' => 'Bearer {access-token}',
      'params' => {
      }
    }
    
    result = RestClient.get 'https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/{field_name}',
      headers 
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Range': 'bytes=0-100',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.get('https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/{field_name}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    <?php
    
    require 'vendor/autoload.php';
    
    $headers = array(
        'Accept' => 'application/json',
        'Range' => 'bytes=0-100',
        'Authorization' => 'Bearer {access-token}',
    );
    
    $client = new \GuzzleHttp\Client();
    
    // Define array of request body.
    $request_body = array();
    
    try {
        $response = $client->request('GET','https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/{field_name}', array(
            'headers' => $headers,
            'json' => $request_body,
           )
        );
        print_r($response->getBody()->getContents());
     }
     catch (\GuzzleHttp\Exception\BadResponseException $e) {
        // handle exception or api errors.
        print_r($e->getMessage());
     }
    
     // ...
    
    
    URL obj = new URL("https://shotgunlocalhost.com/api/v1.1/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"},
            "Range": []string{"bytes=0-100"},
            "Authorization": []string{"Bearer {access-token}"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://shotgunlocalhost.com/api/v1.1/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.
    Range header string false Request header indicates the byte range of a document that the server should return. Example: bytes=0-100

    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.1/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

    Get upload URL for record

    Code samples

    # You can also use wget
    curl -X GET https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/_upload?filename=string \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    GET https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/_upload?filename=string HTTP/1.1
    Host: shotgunlocalhost.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/_upload',
      method: 'get',
      data: '?filename=string',
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}',
      'params' => {
        'filename' => 'string'
      }
    }
    
    result = RestClient.get 'https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/_upload',
      headers 
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.get('https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/_upload', params={
      'filename': 'string'
    }, headers = headers)
    
    print r.json()
    
    
    <?php
    
    require 'vendor/autoload.php';
    
    $headers = array(
        'Accept' => 'application/json',
        'Authorization' => 'Bearer {access-token}',
    );
    
    $client = new \GuzzleHttp\Client();
    
    // Define array of request body.
    $request_body = array();
    
    try {
        $response = $client->request('GET','https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/_upload', array(
            'headers' => $headers,
            'json' => $request_body,
           )
        );
        print_r($response->getBody()->getContents());
     }
     catch (\GuzzleHttp\Exception\BadResponseException $e) {
        // handle exception or api errors.
        print_r($e->getMessage());
     }
    
     // ...
    
    
    URL obj = new URL("https://shotgunlocalhost.com/api/v1.1/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://shotgunlocalhost.com/api/v1.1/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.
    multipart_upload query boolean false Return a multipart upload url

    Example responses

    200 undefined

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

    Responses

    Status Meaning Description Schema
    200 OK The information needed to upload a file to Flow Production Tracking 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://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/_upload?filename=string&signature=string \
      -H 'Content-Type: */*' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}' \ 
      -d '@file.png'
    
    
    PUT https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/_upload?filename=string&signature=string HTTP/1.1
    Host: shotgunlocalhost.com
    Content-Type: */*
    Accept: application/json
    
    
    var headers = {
      'Content-Type':'*/*',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/_upload',
      method: 'put',
      data: '?filename=string&signature=string',
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => '*/*',
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}',
      'params' => {
        'filename' => 'string',
        'signature' => 'string'
      }
    }
    
    body = File.new('file', 'rb')
    
    result = RestClient.put 'https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/_upload',
      body,
      headers 
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': '*/*',
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    data = open('file', 'rb')
    
    r = requests.put('https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/_upload', data=data, params={
      'filename': 'string',  'signature': 'string'
    }, headers = headers)
    
    print r.json()
    
    
    <?php
    
    require 'vendor/autoload.php';
    
    $headers = array(
        'Content-Type' => '*/*',
        'Accept' => 'application/json',
        'Authorization' => 'Bearer {access-token}',
    );
    
    $client = new \GuzzleHttp\Client();
    
    // Define array of request body.
    $request_body = array();
    
    try {
        $response = $client->request('PUT','https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/_upload', array(
            'headers' => $headers,
            'json' => $request_body,
           )
        );
        print_r($response->getBody()->getContents());
     }
     catch (\GuzzleHttp\Exception\BadResponseException $e) {
        // handle exception or api errors.
        print_r($e->getMessage());
     }
    
     // ...
    
    
    URL obj = new URL("https://shotgunlocalhost.com/api/v1.1/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://shotgunlocalhost.com/api/v1.1/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. This is the 'upload' link received from the 'Get upload URL' call.

    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.1/entity/projects/86/image/_upload"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK The information needed to complete an upload to Flow Production Tracking. 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://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/_upload \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    POST https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/_upload HTTP/1.1
    Host: shotgunlocalhost.com
    Content-Type: application/json
    Accept: application/json
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/_upload',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}',
      'params' => {
      }
    }
    
    body = {
    }
    
    result = RestClient.post 'https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/_upload',
      body,
      headers 
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.post('https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/_upload', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    <?php
    
    require 'vendor/autoload.php';
    
    $headers = array(
        'Content-Type' => 'application/json',
        'Accept' => 'application/json',
        'Authorization' => 'Bearer {access-token}',
    );
    
    $client = new \GuzzleHttp\Client();
    
    // Define array of request body.
    $request_body = array();
    
    try {
        $response = $client->request('POST','https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/_upload', array(
            'headers' => $headers,
            'json' => $request_body,
           )
        );
        print_r($response->getBody()->getContents());
     }
     catch (\GuzzleHttp\Exception\BadResponseException $e) {
        // handle exception or api errors.
        print_r($e->getMessage());
     }
    
     // ...
    
    
    URL obj = new URL("https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/_upload");
    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://shotgunlocalhost.com/api/v1.1/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. This is the 'complete_upload' link received from the 'Get upload URL' 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.
    body body object true The info for this upload upload operation.
    » upload_info body object true Response data from the request to get an upload URL and the upload request.
    »» 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 Flow Production Tracking 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
    201 Created 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 the URL for the next part to upload in a multi-part upload for a record

    Code samples

    # You can also use wget
    curl -X GET https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/_upload/multipart?filename=string&upload_type=Attachment&timestamp=string&upload_id=string&part_number=0 \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    GET https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/_upload/multipart?filename=string&upload_type=Attachment&timestamp=string&upload_id=string&part_number=0 HTTP/1.1
    Host: shotgunlocalhost.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/_upload/multipart',
      method: 'get',
      data: '?filename=string&upload_type=Attachment&timestamp=string&upload_id=string&part_number=0',
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}',
      'params' => {
        'filename' => 'string',
        'upload_type' => 'string',
        'timestamp' => 'string',
        'upload_id' => 'string',
        'part_number' => 'integer'
      }
    }
    
    result = RestClient.get 'https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/_upload/multipart',
      headers 
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.get('https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/_upload/multipart', params={
      'filename': 'string',  'upload_type': 'Attachment',  'timestamp': 'string',  'upload_id': 'string',  'part_number': '0'
    }, headers = headers)
    
    print r.json()
    
    
    <?php
    
    require 'vendor/autoload.php';
    
    $headers = array(
        'Accept' => 'application/json',
        'Authorization' => 'Bearer {access-token}',
    );
    
    $client = new \GuzzleHttp\Client();
    
    // Define array of request body.
    $request_body = array();
    
    try {
        $response = $client->request('GET','https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/_upload/multipart', array(
            'headers' => $headers,
            'json' => $request_body,
           )
        );
        print_r($response->getBody()->getContents());
     }
     catch (\GuzzleHttp\Exception\BadResponseException $e) {
        // handle exception or api errors.
        print_r($e->getMessage());
     }
    
     // ...
    
    
    URL obj = new URL("https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/_upload/multipart?filename=string&upload_type=Attachment&timestamp=string&upload_id=string&part_number=0");
    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://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/_upload/multipart", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

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

    This endpoint indicates a multi-part upload has been aborted. This is the 'get_next_part' link received from the 'Get upload URL' request, when a multi-part upload is specified.

    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.
    upload_type query string true Specifies the type of upload
    timestamp query string true Specifies the timestamp of the upload
    upload_id query string true Specifies the unique id of an upload operation
    part_number query integer true Specifies the upload part number for this request

    Enumerated Values

    Parameter Value
    upload_type Attachment
    upload_type Thumbnail

    Example responses

    200 undefined

    {
      "links": {
        "upload": "https://yoursite.shotgunstudio.com/api/v1.1/entity/versions/1/sg_uploaded_movie/_upload?filename=logo.png&signature=OaHsK%2BrkZk5w1GxgxI3aNmJ0H3Y%3D&user_id=1&user_type=HumanUser&expiration=1532618412",
        "get_next_part": "/api/v1.1/entity/versions/1/sg_uploaded_movie/_upload/multipart?filename=logo.png&part_number=2&timestamp=2019-04-16T21%3A23%3A36Z&upload_id=S.04OooF4_fxTPecfUd9XcifdgsduUH2.JEdk7vus4kswJj6l&upload_type=Attachment"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK The URL of the next part to upload. NextUploadPartResponse
    401 Unauthorized Request rejected due to invalid credentials. ErrorResponse
    404 Not Found Record does not exist. ErrorResponse

    Abort a multi-part upload for record

    Code samples

    # You can also use wget
    curl -X POST https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/_upload/multipart_abort \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    POST https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/_upload/multipart_abort HTTP/1.1
    Host: shotgunlocalhost.com
    Content-Type: application/json
    Accept: application/json
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/_upload/multipart_abort',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}',
      'params' => {
      }
    }
    
    body = {
    }
    
    result = RestClient.post 'https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/_upload/multipart_abort',
      body,
      headers 
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.post('https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/_upload/multipart_abort', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    <?php
    
    require 'vendor/autoload.php';
    
    $headers = array(
        'Content-Type' => 'application/json',
        'Accept' => 'application/json',
        'Authorization' => 'Bearer {access-token}',
    );
    
    $client = new \GuzzleHttp\Client();
    
    // Define array of request body.
    $request_body = array();
    
    try {
        $response = $client->request('POST','https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/_upload/multipart_abort', array(
            'headers' => $headers,
            'json' => $request_body,
           )
        );
        print_r($response->getBody()->getContents());
     }
     catch (\GuzzleHttp\Exception\BadResponseException $e) {
        // handle exception or api errors.
        print_r($e->getMessage());
     }
    
     // ...
    
    
    URL obj = new URL("https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/_upload/multipart_abort");
    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://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/_upload/multipart_abort", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

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

    This endpoint requests a multi-part upload to be aborted.

    Body parameter

    {
      "upload_info": {
        "timestamp": "string",
        "upload_type": "Attachment",
        "upload_id": "string",
        "storage_service": "sg",
        "original_filename": "string",
        "multipart_upload": 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.
    record_id path integer true Id of the record to connect the upload to.
    body body object true The info for this upload operation.
    » upload_info body object true Response data from the request to get an upload URL and the upload request.
    »» 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 Flow Production Tracking 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.

    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
    200 OK Upload has been aborted. 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://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/{field_name}/_upload?filename=string \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    GET https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/{field_name}/_upload?filename=string HTTP/1.1
    Host: shotgunlocalhost.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/{field_name}/_upload',
      method: 'get',
      data: '?filename=string',
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}',
      'params' => {
        'filename' => 'string'
      }
    }
    
    result = RestClient.get 'https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/{field_name}/_upload',
      headers 
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.get('https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/{field_name}/_upload', params={
      'filename': 'string'
    }, headers = headers)
    
    print r.json()
    
    
    <?php
    
    require 'vendor/autoload.php';
    
    $headers = array(
        'Accept' => 'application/json',
        'Authorization' => 'Bearer {access-token}',
    );
    
    $client = new \GuzzleHttp\Client();
    
    // Define array of request body.
    $request_body = array();
    
    try {
        $response = $client->request('GET','https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/{field_name}/_upload', array(
            'headers' => $headers,
            'json' => $request_body,
           )
        );
        print_r($response->getBody()->getContents());
     }
     catch (\GuzzleHttp\Exception\BadResponseException $e) {
        // handle exception or api errors.
        print_r($e->getMessage());
     }
    
     // ...
    
    
    URL obj = new URL("https://shotgunlocalhost.com/api/v1.1/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{
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://shotgunlocalhost.com/api/v1.1/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.

    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.
    multipart_upload query boolean false Return a multipart upload url

    Example responses

    200 undefined

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

    Responses

    Status Meaning Description Schema
    200 OK The information needed to upload a file to Flow Production Tracking or S3. UploadInfoResponse
    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://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/{field_name}/_upload?filename=string&signature=string&user_id=0&user_type=string&expiration=0 \
      -H 'Content-Type: */*' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}' \ 
      -d '@file.png'
    
    
    PUT https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/{field_name}/_upload?filename=string&signature=string&user_id=0&user_type=string&expiration=0 HTTP/1.1
    Host: shotgunlocalhost.com
    Content-Type: */*
    Accept: application/json
    
    
    var headers = {
      'Content-Type':'*/*',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/{field_name}/_upload',
      method: 'put',
      data: '?filename=string&signature=string&user_id=0&user_type=string&expiration=0',
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => '*/*',
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}',
      'params' => {
        'filename' => 'string',
        'signature' => 'string',
        'user_id' => 'integer',
        'user_type' => 'string',
        'expiration' => 'integer'
      }
    }
    
    body = File.new('file', 'rb')
    
    result = RestClient.put 'https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/{field_name}/_upload',
      body,
      headers 
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': '*/*',
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    data = open('file', 'rb')
    
    r = requests.put('https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/{field_name}/_upload', data=data, params={
      'filename': 'string',  'signature': 'string',  'user_id': '0',  'user_type': 'string',  'expiration': '0'
    }, headers = headers)
    
    print r.json()
    
    
    <?php
    
    require 'vendor/autoload.php';
    
    $headers = array(
        'Content-Type' => '*/*',
        'Accept' => 'application/json',
        'Authorization' => 'Bearer {access-token}',
    );
    
    $client = new \GuzzleHttp\Client();
    
    // Define array of request body.
    $request_body = array();
    
    try {
        $response = $client->request('PUT','https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/{field_name}/_upload', array(
            'headers' => $headers,
            'json' => $request_body,
           )
        );
        print_r($response->getBody()->getContents());
     }
     catch (\GuzzleHttp\Exception\BadResponseException $e) {
        // handle exception or api errors.
        print_r($e->getMessage());
     }
    
     // ...
    
    
    URL obj = new URL("https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/{field_name}/_upload?filename=string&signature=string&user_id=0&user_type=string&expiration=0");
    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://shotgunlocalhost.com/api/v1.1/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. This is the 'upload' link received from the 'Get upload URL' request.

    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.
    user_id query integer true Id of the user uploading the file
    user_type query string true Type of the user uploading the file
    expiration query integer true Expiration timestamp for the upload
    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.1/entity/projects/86/image/_upload"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK The information needed to complete an upload to Flow Production Tracking. 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://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/{field_name}/_upload?filename=string \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    POST https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/{field_name}/_upload?filename=string HTTP/1.1
    Host: shotgunlocalhost.com
    Content-Type: application/json
    Accept: application/json
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/{field_name}/_upload',
      method: 'post',
      data: '?filename=string',
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}',
      'params' => {
        'filename' => 'string'
      }
    }
    
    body = {
    }
    
    result = RestClient.post 'https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/{field_name}/_upload',
      body,
      headers 
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.post('https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/{field_name}/_upload', params={
      'filename': 'string'
    }, headers = headers)
    
    print r.json()
    
    
    <?php
    
    require 'vendor/autoload.php';
    
    $headers = array(
        'Content-Type' => 'application/json',
        'Accept' => 'application/json',
        'Authorization' => 'Bearer {access-token}',
    );
    
    $client = new \GuzzleHttp\Client();
    
    // Define array of request body.
    $request_body = array();
    
    try {
        $response = $client->request('POST','https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/{field_name}/_upload', array(
            'headers' => $headers,
            'json' => $request_body,
           )
        );
        print_r($response->getBody()->getContents());
     }
     catch (\GuzzleHttp\Exception\BadResponseException $e) {
        // handle exception or api errors.
        print_r($e->getMessage());
     }
    
     // ...
    
    
    URL obj = new URL("https://shotgunlocalhost.com/api/v1.1/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{
            "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://shotgunlocalhost.com/api/v1.1/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 is 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.
    field_name path string true The field on the entity.
    filename query string true The name of the file to be uploaded.
    body body object true The info for this upload upload operation.
    » upload_info body object true Response data from the request to get an upload URL and the upload request.
    »» 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 Flow Production Tracking 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
    201 Created Attachment has been created and linked to the field on the record. None
    401 Unauthorized Request rejected due to invalid credentials. ErrorResponse
    404 Not Found Record does not exist. ErrorResponse

    Get the URL for the next part to upload in a multi-part upload for a field

    Code samples

    # You can also use wget
    curl -X GET https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/{field_name}/_upload/multipart?filename=string&upload_type=Attachment&timestamp=string&upload_id=string&part_number=0 \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    GET https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/{field_name}/_upload/multipart?filename=string&upload_type=Attachment&timestamp=string&upload_id=string&part_number=0 HTTP/1.1
    Host: shotgunlocalhost.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/{field_name}/_upload/multipart',
      method: 'get',
      data: '?filename=string&upload_type=Attachment&timestamp=string&upload_id=string&part_number=0',
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}',
      'params' => {
        'filename' => 'string',
        'upload_type' => 'string',
        'timestamp' => 'string',
        'upload_id' => 'string',
        'part_number' => 'integer'
      }
    }
    
    result = RestClient.get 'https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/{field_name}/_upload/multipart',
      headers 
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.get('https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/{field_name}/_upload/multipart', params={
      'filename': 'string',  'upload_type': 'Attachment',  'timestamp': 'string',  'upload_id': 'string',  'part_number': '0'
    }, headers = headers)
    
    print r.json()
    
    
    <?php
    
    require 'vendor/autoload.php';
    
    $headers = array(
        'Accept' => 'application/json',
        'Authorization' => 'Bearer {access-token}',
    );
    
    $client = new \GuzzleHttp\Client();
    
    // Define array of request body.
    $request_body = array();
    
    try {
        $response = $client->request('GET','https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/{field_name}/_upload/multipart', array(
            'headers' => $headers,
            'json' => $request_body,
           )
        );
        print_r($response->getBody()->getContents());
     }
     catch (\GuzzleHttp\Exception\BadResponseException $e) {
        // handle exception or api errors.
        print_r($e->getMessage());
     }
    
     // ...
    
    
    URL obj = new URL("https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/{field_name}/_upload/multipart?filename=string&upload_type=Attachment&timestamp=string&upload_id=string&part_number=0");
    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://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/{field_name}/_upload/multipart", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

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

    This endpoint indicates a multi-part upload has been aborted. This is the 'get_next_part' link received from the 'Get upload URL' request, when a multi-part upload is specified.

    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.
    field_name path string true The field on the entity.
    filename query string true The name of the file to be uploaded.
    upload_type query string true Specifies the type of upload
    timestamp query string true Specifies the timestamp of the upload
    upload_id query string true Specifies the unique id of an upload operation
    part_number query integer true Specifies the upload part number for this request

    Enumerated Values

    Parameter Value
    upload_type Attachment
    upload_type Thumbnail

    Example responses

    200 undefined

    {
      "links": {
        "upload": "https://yoursite.shotgunstudio.com/api/v1.1/entity/versions/1/sg_uploaded_movie/_upload?filename=logo.png&signature=OaHsK%2BrkZk5w1GxgxI3aNmJ0H3Y%3D&user_id=1&user_type=HumanUser&expiration=1532618412",
        "get_next_part": "/api/v1.1/entity/versions/1/sg_uploaded_movie/_upload/multipart?filename=logo.png&part_number=2&timestamp=2019-04-16T21%3A23%3A36Z&upload_id=S.04OooF4_fxTPecfUd9XcifdgsduUH2.JEdk7vus4kswJj6l&upload_type=Attachment"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK The URL of the next part to upload. NextUploadPartResponse
    401 Unauthorized Request rejected due to invalid credentials. ErrorResponse
    404 Not Found Record does not exist. ErrorResponse

    Abort a multi-part upload for a field

    Code samples

    # You can also use wget
    curl -X POST https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/{field_name}/_upload/multipart_abort \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    POST https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/{field_name}/_upload/multipart_abort HTTP/1.1
    Host: shotgunlocalhost.com
    Content-Type: application/json
    Accept: application/json
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/{field_name}/_upload/multipart_abort',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}',
      'params' => {
      }
    }
    
    body = {
    }
    
    result = RestClient.post 'https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/{field_name}/_upload/multipart_abort',
      body,
      headers 
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.post('https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/{field_name}/_upload/multipart_abort', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    <?php
    
    require 'vendor/autoload.php';
    
    $headers = array(
        'Content-Type' => 'application/json',
        'Accept' => 'application/json',
        'Authorization' => 'Bearer {access-token}',
    );
    
    $client = new \GuzzleHttp\Client();
    
    // Define array of request body.
    $request_body = array();
    
    try {
        $response = $client->request('POST','https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/{field_name}/_upload/multipart_abort', array(
            'headers' => $headers,
            'json' => $request_body,
           )
        );
        print_r($response->getBody()->getContents());
     }
     catch (\GuzzleHttp\Exception\BadResponseException $e) {
        // handle exception or api errors.
        print_r($e->getMessage());
     }
    
     // ...
    
    
    URL obj = new URL("https://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/{field_name}/_upload/multipart_abort");
    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://shotgunlocalhost.com/api/v1.1/entity/{entity}/{record_id}/{field_name}/_upload/multipart_abort", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

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

    This endpoint requests a multi-part upload to be aborted.

    Body parameter

    {
      "upload_info": {
        "timestamp": "string",
        "upload_type": "Attachment",
        "upload_id": "string",
        "storage_service": "sg",
        "original_filename": "string",
        "multipart_upload": 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.
    record_id path integer true Id of the record to connect the upload to.
    field_name path string true The field on the entity.
    body body object true The info for this upload operation.
    » upload_info body object true Response data from the request to get an upload URL and the upload request.
    »» 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 Flow Production Tracking 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.

    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
    200 OK Upload has been aborted. None
    401 Unauthorized Request rejected due to invalid credentials. ErrorResponse
    404 Not Found Record does not exist. ErrorResponse

    Access Schema data

    The schema endpoints give you the ability to introspect the schema of your Flow Production Tracking site.

    Read schema for all entities

    Code samples

    # You can also use wget
    curl -X GET https://shotgunlocalhost.com/api/v1.1/schema \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    GET https://shotgunlocalhost.com/api/v1.1/schema HTTP/1.1
    Host: shotgunlocalhost.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://shotgunlocalhost.com/api/v1.1/schema',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}',
      'params' => {
      }
    }
    
    result = RestClient.get 'https://shotgunlocalhost.com/api/v1.1/schema',
      headers 
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.get('https://shotgunlocalhost.com/api/v1.1/schema', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    <?php
    
    require 'vendor/autoload.php';
    
    $headers = array(
        'Accept' => 'application/json',
        'Authorization' => 'Bearer {access-token}',
    );
    
    $client = new \GuzzleHttp\Client();
    
    // Define array of request body.
    $request_body = array();
    
    try {
        $response = $client->request('GET','https://shotgunlocalhost.com/api/v1.1/schema', array(
            'headers' => $headers,
            'json' => $request_body,
           )
        );
        print_r($response->getBody()->getContents());
     }
     catch (\GuzzleHttp\Exception\BadResponseException $e) {
        // handle exception or api errors.
        print_r($e->getMessage());
     }
    
     // ...
    
    
    URL obj = new URL("https://shotgunlocalhost.com/api/v1.1/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://shotgunlocalhost.com/api/v1.1/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.1/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://shotgunlocalhost.com/api/v1.1/schema/{entity} \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    GET https://shotgunlocalhost.com/api/v1.1/schema/{entity} HTTP/1.1
    Host: shotgunlocalhost.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://shotgunlocalhost.com/api/v1.1/schema/{entity}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}',
      'params' => {
      }
    }
    
    result = RestClient.get 'https://shotgunlocalhost.com/api/v1.1/schema/{entity}',
      headers 
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.get('https://shotgunlocalhost.com/api/v1.1/schema/{entity}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    <?php
    
    require 'vendor/autoload.php';
    
    $headers = array(
        'Accept' => 'application/json',
        'Authorization' => 'Bearer {access-token}',
    );
    
    $client = new \GuzzleHttp\Client();
    
    // Define array of request body.
    $request_body = array();
    
    try {
        $response = $client->request('GET','https://shotgunlocalhost.com/api/v1.1/schema/{entity}', array(
            'headers' => $headers,
            'json' => $request_body,
           )
        );
        print_r($response->getBody()->getContents());
     }
     catch (\GuzzleHttp\Exception\BadResponseException $e) {
        // handle exception or api errors.
        print_r($e->getMessage());
     }
    
     // ...
    
    
    URL obj = new URL("https://shotgunlocalhost.com/api/v1.1/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://shotgunlocalhost.com/api/v1.1/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.1/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://shotgunlocalhost.com/api/v1.1/schema/{entity}/fields \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    GET https://shotgunlocalhost.com/api/v1.1/schema/{entity}/fields HTTP/1.1
    Host: shotgunlocalhost.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://shotgunlocalhost.com/api/v1.1/schema/{entity}/fields',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}',
      'params' => {
      }
    }
    
    result = RestClient.get 'https://shotgunlocalhost.com/api/v1.1/schema/{entity}/fields',
      headers 
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.get('https://shotgunlocalhost.com/api/v1.1/schema/{entity}/fields', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    <?php
    
    require 'vendor/autoload.php';
    
    $headers = array(
        'Accept' => 'application/json',
        'Authorization' => 'Bearer {access-token}',
    );
    
    $client = new \GuzzleHttp\Client();
    
    // Define array of request body.
    $request_body = array();
    
    try {
        $response = $client->request('GET','https://shotgunlocalhost.com/api/v1.1/schema/{entity}/fields', array(
            'headers' => $headers,
            'json' => $request_body,
           )
        );
        print_r($response->getBody()->getContents());
     }
     catch (\GuzzleHttp\Exception\BadResponseException $e) {
        // handle exception or api errors.
        print_r($e->getMessage());
     }
    
     // ...
    
    
    URL obj = new URL("https://shotgunlocalhost.com/api/v1.1/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://shotgunlocalhost.com/api/v1.1/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
            }
          },
          "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.1/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://shotgunlocalhost.com/api/v1.1/schema/{entity}/fields \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    POST https://shotgunlocalhost.com/api/v1.1/schema/{entity}/fields HTTP/1.1
    Host: shotgunlocalhost.com
    Content-Type: application/json
    Accept: application/json
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://shotgunlocalhost.com/api/v1.1/schema/{entity}/fields',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}',
      'params' => {
      }
    }
    
    body = {
    }
    
    result = RestClient.post 'https://shotgunlocalhost.com/api/v1.1/schema/{entity}/fields',
      body,
      headers 
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.post('https://shotgunlocalhost.com/api/v1.1/schema/{entity}/fields', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    <?php
    
    require 'vendor/autoload.php';
    
    $headers = array(
        'Content-Type' => 'application/json',
        'Accept' => 'application/json',
        'Authorization' => 'Bearer {access-token}',
    );
    
    $client = new \GuzzleHttp\Client();
    
    // Define array of request body.
    $request_body = array();
    
    try {
        $response = $client->request('POST','https://shotgunlocalhost.com/api/v1.1/schema/{entity}/fields', array(
            'headers' => $headers,
            'json' => $request_body,
           )
        );
        print_r($response->getBody()->getContents());
     }
     catch (\GuzzleHttp\Exception\BadResponseException $e) {
        // handle exception or api errors.
        print_r($e->getMessage());
     }
    
     // ...
    
    
    URL obj = new URL("https://shotgunlocalhost.com/api/v1.1/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://shotgunlocalhost.com/api/v1.1/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": {
        "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.1/schema/projects/fields/billboard"
      }
    }
    

    Responses

    Status Meaning Description Schema
    201 Created Field successfully created SchemaFieldResponse
    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://shotgunlocalhost.com/api/v1.1/schema/{entity}/fields/{field_name} \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    GET https://shotgunlocalhost.com/api/v1.1/schema/{entity}/fields/{field_name} HTTP/1.1
    Host: shotgunlocalhost.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://shotgunlocalhost.com/api/v1.1/schema/{entity}/fields/{field_name}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}',
      'params' => {
      }
    }
    
    result = RestClient.get 'https://shotgunlocalhost.com/api/v1.1/schema/{entity}/fields/{field_name}',
      headers 
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.get('https://shotgunlocalhost.com/api/v1.1/schema/{entity}/fields/{field_name}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    <?php
    
    require 'vendor/autoload.php';
    
    $headers = array(
        'Accept' => 'application/json',
        'Authorization' => 'Bearer {access-token}',
    );
    
    $client = new \GuzzleHttp\Client();
    
    // Define array of request body.
    $request_body = array();
    
    try {
        $response = $client->request('GET','https://shotgunlocalhost.com/api/v1.1/schema/{entity}/fields/{field_name}', array(
            'headers' => $headers,
            'json' => $request_body,
           )
        );
        print_r($response->getBody()->getContents());
     }
     catch (\GuzzleHttp\Exception\BadResponseException $e) {
        // handle exception or api errors.
        print_r($e->getMessage());
     }
    
     // ...
    
    
    URL obj = new URL("https://shotgunlocalhost.com/api/v1.1/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://shotgunlocalhost.com/api/v1.1/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.1/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

    Update the properties of a field on an entity

    Code samples

    # You can also use wget
    curl -X PUT https://shotgunlocalhost.com/api/v1.1/schema/{entity}/fields/{field_name} \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    PUT https://shotgunlocalhost.com/api/v1.1/schema/{entity}/fields/{field_name} HTTP/1.1
    Host: shotgunlocalhost.com
    Content-Type: application/json
    Accept: application/json
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://shotgunlocalhost.com/api/v1.1/schema/{entity}/fields/{field_name}',
      method: 'put',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}',
      'params' => {
      }
    }
    
    body = {
    }
    
    result = RestClient.put 'https://shotgunlocalhost.com/api/v1.1/schema/{entity}/fields/{field_name}',
      body,
      headers 
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.put('https://shotgunlocalhost.com/api/v1.1/schema/{entity}/fields/{field_name}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    <?php
    
    require 'vendor/autoload.php';
    
    $headers = array(
        'Content-Type' => 'application/json',
        'Accept' => 'application/json',
        'Authorization' => 'Bearer {access-token}',
    );
    
    $client = new \GuzzleHttp\Client();
    
    // Define array of request body.
    $request_body = array();
    
    try {
        $response = $client->request('PUT','https://shotgunlocalhost.com/api/v1.1/schema/{entity}/fields/{field_name}', array(
            'headers' => $headers,
            'json' => $request_body,
           )
        );
        print_r($response->getBody()->getContents());
     }
     catch (\GuzzleHttp\Exception\BadResponseException $e) {
        // handle exception or api errors.
        print_r($e->getMessage());
     }
    
     // ...
    
    
    URL obj = new URL("https://shotgunlocalhost.com/api/v1.1/schema/{entity}/fields/{field_name}");
    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://shotgunlocalhost.com/api/v1.1/schema/{entity}/fields/{field_name}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    PUT /schema/{entity}/fields/{field_name}

    Updates the properties of a field on an entity

    Body parameter

    {
      "properties": [
        {
          "property_name": "string",
          "value": "string"
        }
      ],
      "project_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.
    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
    » project_id body integer false Optional project id specifying which project to modify the visible property for.

    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.1/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://shotgunlocalhost.com/api/v1.1/schema/{entity}/fields/{field_name} \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    DELETE https://shotgunlocalhost.com/api/v1.1/schema/{entity}/fields/{field_name} HTTP/1.1
    Host: shotgunlocalhost.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://shotgunlocalhost.com/api/v1.1/schema/{entity}/fields/{field_name}',
      method: 'delete',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}',
      'params' => {
      }
    }
    
    result = RestClient.delete 'https://shotgunlocalhost.com/api/v1.1/schema/{entity}/fields/{field_name}',
      headers 
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.delete('https://shotgunlocalhost.com/api/v1.1/schema/{entity}/fields/{field_name}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    <?php
    
    require 'vendor/autoload.php';
    
    $headers = array(
        'Accept' => 'application/json',
        'Authorization' => 'Bearer {access-token}',
    );
    
    $client = new \GuzzleHttp\Client();
    
    // Define array of request body.
    $request_body = array();
    
    try {
        $response = $client->request('DELETE','https://shotgunlocalhost.com/api/v1.1/schema/{entity}/fields/{field_name}', array(
            'headers' => $headers,
            'json' => $request_body,
           )
        );
        print_r($response->getBody()->getContents());
     }
     catch (\GuzzleHttp\Exception\BadResponseException $e) {
        // handle exception or api errors.
        print_r($e->getMessage());
     }
    
     // ...
    
    
    URL obj = new URL("https://shotgunlocalhost.com/api/v1.1/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://shotgunlocalhost.com/api/v1.1/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 Flow Production Tracking.

    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
    404 Not Found Field does not exist. ErrorResponse

    Revive one field from an entity

    Code samples

    # You can also use wget
    curl -X POST https://shotgunlocalhost.com/api/v1.1/schema/{entity}/fields/{field_name}?revive=true \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    POST https://shotgunlocalhost.com/api/v1.1/schema/{entity}/fields/{field_name}?revive=true HTTP/1.1
    Host: shotgunlocalhost.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://shotgunlocalhost.com/api/v1.1/schema/{entity}/fields/{field_name}',
      method: 'post',
      data: '?revive=true',
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}',
      'params' => {
        'revive' => 'boolean'
      }
    }
    
    result = RestClient.post 'https://shotgunlocalhost.com/api/v1.1/schema/{entity}/fields/{field_name}', nil,
      headers 
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.post('https://shotgunlocalhost.com/api/v1.1/schema/{entity}/fields/{field_name}', params={
      'revive': 'true'
    }, headers = headers)
    
    print r.json()
    
    
    <?php
    
    require 'vendor/autoload.php';
    
    $headers = array(
        'Accept' => 'application/json',
        'Authorization' => 'Bearer {access-token}',
    );
    
    $client = new \GuzzleHttp\Client();
    
    // Define array of request body.
    $request_body = array();
    
    try {
        $response = $client->request('POST','https://shotgunlocalhost.com/api/v1.1/schema/{entity}/fields/{field_name}', array(
            'headers' => $headers,
            'json' => $request_body,
           )
        );
        print_r($response->getBody()->getContents());
     }
     catch (\GuzzleHttp\Exception\BadResponseException $e) {
        // handle exception or api errors.
        print_r($e->getMessage());
     }
    
     // ...
    
    
    URL obj = new URL("https://shotgunlocalhost.com/api/v1.1/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://shotgunlocalhost.com/api/v1.1/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 Flow Production Tracking.

    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
    404 Not Found Retired field 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://shotgunlocalhost.com/api/v1.1/hierarchy/_expand \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    POST https://shotgunlocalhost.com/api/v1.1/hierarchy/_expand HTTP/1.1
    Host: shotgunlocalhost.com
    Content-Type: application/json
    Accept: application/json
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://shotgunlocalhost.com/api/v1.1/hierarchy/_expand',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}',
      'params' => {
      }
    }
    
    body = {
    }
    
    result = RestClient.post 'https://shotgunlocalhost.com/api/v1.1/hierarchy/_expand',
      body,
      headers 
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.post('https://shotgunlocalhost.com/api/v1.1/hierarchy/_expand', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    <?php
    
    require 'vendor/autoload.php';
    
    $headers = array(
        'Content-Type' => 'application/json',
        'Accept' => 'application/json',
        'Authorization' => 'Bearer {access-token}',
    );
    
    $client = new \GuzzleHttp\Client();
    
    // Define array of request body.
    $request_body = array();
    
    try {
        $response = $client->request('POST','https://shotgunlocalhost.com/api/v1.1/hierarchy/_expand', array(
            'headers' => $headers,
            'json' => $request_body,
           )
        );
        print_r($response->getBody()->getContents());
     }
     catch (\GuzzleHttp\Exception\BadResponseException $e) {
        // handle exception or api errors.
        print_r($e->getMessage());
     }
    
     // ...
    
    
    URL obj = new URL("https://shotgunlocalhost.com/api/v1.1/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://shotgunlocalhost.com/api/v1.1/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": "Demo: Animation",
        "ref": {
          "kind": "entity",
          "value": {
            "type": "Project",
            "id": 70
          }
        },
        "parent_path": "/",
        "path": "/Project/70",
        "target_entities": {
          "type": "Version",
          "additional_filter_presets": [
            {
              "preset_name": "NAV_ENTRIES",
              "path": "/Project/70",
              "seed": {
                "type": "Version",
                "field": "entity"
              }
            }
          ]
        },
        "has_children": true,
        "children": [
          {
            "label": "Assets",
            "ref": {
              "kind": "entity_type",
              "value": "Asset"
            },
            "path": "/Project/70/Asset",
            "target_entities": {
              "type": "Version",
              "additional_filter_presets": [
                {
                  "preset_name": "NAV_ENTRIES",
                  "path": "/Project/70/Asset",
                  "seed": {
                    "type": "Version",
                    "field": "entity"
                  }
                }
              ]
            },
            "has_children": true
          },
          {
            "label": "Shots",
            "ref": {
              "kind": "entity_type",
              "value": "Shot"
            },
            "path": "/Project/70/Shot",
            "target_entities": {
              "type": "Version",
              "additional_filter_presets": [
                {
                  "preset_name": "NAV_ENTRIES",
                  "path": "/Project/70/Shot",
                  "seed": {
                    "type": "Version",
                    "field": "entity"
                  }
                }
              ]
            },
            "has_children": true
          }
        ]
      }
    }
    

    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://shotgunlocalhost.com/api/v1.1/hierarchy/_search \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    POST https://shotgunlocalhost.com/api/v1.1/hierarchy/_search HTTP/1.1
    Host: shotgunlocalhost.com
    Content-Type: application/json
    Accept: application/json
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://shotgunlocalhost.com/api/v1.1/hierarchy/_search',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}',
      'params' => {
      }
    }
    
    body = {
    }
    
    result = RestClient.post 'https://shotgunlocalhost.com/api/v1.1/hierarchy/_search',
      body,
      headers 
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.post('https://shotgunlocalhost.com/api/v1.1/hierarchy/_search', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    <?php
    
    require 'vendor/autoload.php';
    
    $headers = array(
        'Content-Type' => 'application/json',
        'Accept' => 'application/json',
        'Authorization' => 'Bearer {access-token}',
    );
    
    $client = new \GuzzleHttp\Client();
    
    // Define array of request body.
    $request_body = array();
    
    try {
        $response = $client->request('POST','https://shotgunlocalhost.com/api/v1.1/hierarchy/_search', array(
            'headers' => $headers,
            'json' => $request_body,
           )
        );
        print_r($response->getBody()->getContents());
     }
     catch (\GuzzleHttp\Exception\BadResponseException $e) {
        // handle exception or api errors.
        print_r($e->getMessage());
     }
    
     // ...
    
    
    URL obj = new URL("https://shotgunlocalhost.com/api/v1.1/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://shotgunlocalhost.com/api/v1.1/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 Flow Production Tracking site.

    Read preferences

    Code samples

    # You can also use wget
    curl -X GET https://shotgunlocalhost.com/api/v1.1/preferences \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    GET https://shotgunlocalhost.com/api/v1.1/preferences HTTP/1.1
    Host: shotgunlocalhost.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://shotgunlocalhost.com/api/v1.1/preferences',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}',
      'params' => {
      }
    }
    
    result = RestClient.get 'https://shotgunlocalhost.com/api/v1.1/preferences',
      headers 
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.get('https://shotgunlocalhost.com/api/v1.1/preferences', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    <?php
    
    require 'vendor/autoload.php';
    
    $headers = array(
        'Accept' => 'application/json',
        'Authorization' => 'Bearer {access-token}',
    );
    
    $client = new \GuzzleHttp\Client();
    
    // Define array of request body.
    $request_body = array();
    
    try {
        $response = $client->request('GET','https://shotgunlocalhost.com/api/v1.1/preferences', array(
            'headers' => $headers,
            'json' => $request_body,
           )
        );
        print_r($response->getBody()->getContents());
     }
     catch (\GuzzleHttp\Exception\BadResponseException $e) {
        // handle exception or api errors.
        print_r($e->getMessage());
     }
    
     // ...
    
    
    URL obj = new URL("https://shotgunlocalhost.com/api/v1.1/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://shotgunlocalhost.com/api/v1.1/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. If the list contains a *, all prefs will be returned as well as any additionally specified preferences.

    Example responses

    200 undefined

    {
      "format_date_fields": "Wed, Aug 4 22",
      "date_component_order": "month_day",
      "format_time_hour_fields": "12 hour",
      "format_currency_fields_display_dollar_sign": false,
      "format_currency_fields_decimal_options": "$1,000.99",
      "format_currency_fields_negative_options": "- $1,000",
      "format_number_fields": "1,000",
      "format_float_fields": "9,999.99",
      "format_float_fields_rounding": "9.999999",
      "format_footage_fields": "10-05",
      "support_local_storage": true
    }
    

    401 undefined

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