HTTP

The HTTP API can be used to access NIM information. HTTP requests can be made to read information from the database, create new data, update existing data, and delete entries from the database. All requests responses are received in the form of JavaScript Object Notation (JSON) formatted objects if successful, and either text explaining the error or a value of FALSE.

HTTP requests are prefixed with the path to the hostname and NIM API and appended with the API command (CMD).

NIM API URL: http://hostname:portnumber/nimAPI.php?

API Example

The following request will return the basic job information for the given job ID:

URL:    http://hostname:portnumber/nimAPI.php?q=getJobInfo&ID=1

Result: [{"ID":1,"number":"00000","jobname":"ADMIN","folder":"0_ADMIN"}]

The next example shows how to pass custom keys to update a job:

URL: http://hostname:portnumber/nimAPI.php?q=updateJob&jobID=1&customKeys={"My Custom Key Name":"Value"}

API Keys

NIM API keys are an optional security feature that restricts API access with time limited per user keys. Requiring API keys restricts all API access to only those users with an API key.

If Require API Keys is enabled in ADMIN/Security - Options, two HTTP headers are expected by the API:

X-NIM-API-USER

This is the users username

X-NIM-API-KEY

This is the users API key

The end users will be presented with a dialog box the first time they attempt to use a NIM Connector. API keys are unique to each user. Enter the NIM API key provided to you by your NIM administrator.

Note

It is recommended to ensure that all traffic is using HTTPS when enabling API keys to encrypt all communication. For more information on routing the NIM VM traffic please refer to the nim-ssl script in the Virtual Machine Shell Scripts section of the documentation.

For more information on enabling NIM API Keys please refer to the API Keys section of the documentation. For information on creating user API keys please refer to the Users Grid section of the Administration documentation.

API Common Functions

Test API

Used to test connectivity to the NIM API

URL: http://hostname:portnumber/nimAPI.php?q=testAPI

Return:
    example:    [{"version":"2.5.15.161123","keyValid":"false","keyRequired":"false","error":""}]

    version - The current NIM version
    keyValid - Is the API key valid
    keyRequired - Is Require API Keys enabled
    error - Any additional error logs

Get Culture Codes

Retrieves a list of currency codes used for setting the currency type of an item

URL: http://hostname:portnumber/nimAPI.php?q=getCultureCodes

Return:
    example:    {"success":true,"error":"","rows":[{"cultureCode":"en-US","currency":"United States Dollar","currencyCode":"USD"},{"cultureCode":"en-IE","currency":"Euro (Ireland)","currencyCode":"EUR"},...,"totalRows":44}

    Returns json as an associative array in the format
    result->success        True/False
    result->error          Includes any error or security messaging
    result->rows           An array of returned data
    result->totalRows      The total count of returned rows in the array

Users

Get User ID

Retrieves the user ID from username

URL: http://hostname:portnumber/nimAPI.php?q=getUserID

    Parameters              Description                                  Type            Values                      Default        Required
_____________________________________________________________________________________________________________________________________________

    u                       The username to retrieve the ID              string                                                     YES

Return:
    int

Get User Full Name

Retrieves the user's full name from username

URL: http://hostname:portnumber/nimAPI.php?q=getUserFullName

    Parameters              Description                                  Type            Values                      Default        Required
_____________________________________________________________________________________________________________________________________________

    u                       The username to retrieve the ID              string                                                     YES

Return:
    first_name
    last_name

Get All Users

Returns the full list of NIM Users

URL: http://hostname:portnumber/nimAPI.php?q=getUsers

Return:
    ID
    username
    first_name
    last_name
    full_name

Get User Info

Returns the ID, username, first name, last name, and email address for a given user based on ID or username. One of the two search parameters needs to be provided.

URL: http://hostname:portnumber/nimAPI.php?q=getUserInfo

    Parameters              Description                                  Type            Values                      Default        Required
_____________________________________________________________________________________________________________________________________________

    ID                       The ID of the user to query                 integer                                                    Optional
    username                 The username of the user to query           string                                                     Optional

Return:
    ID
    username
    first_name
    last_name
    full_name
    email

Locations

Get All Locations

Retrieves all defined locations

URL: http://hostname:portnumber/nimAPI.php?q=getLocations

Return:
    Array of locations in the format:
    {
        ID
        name
        description
    }

Contacts

Get Contacts

Get Contacts based on search parameters. Query will return all contacts the requesting user has access to.

Note

This query can return a large amount of data. Use the limit and offset parameters in conjunction with the total_count value to paginate your results.

URL: http://hostname:portnumber/nimAPI.php?q=getContacts

    Parameters          Type        Description
_________________________________________________________________________________________________________________________________

Optional:
    ID                  integer     The ID of a contact item to query
    first_name          string      Will return all contact items matching the first name
    last_name           string      Will return all contact items matching the last name
    email               string      Will return all contact items matching the email
    title               string      Will return all contact items matching the title
    company             string      Will return all contact items matching the company name
    website             string      Will return all contact items matching the website
    work_phone          string      Will return all contact items matching the work phone number
    work_fax            string      Will return all contact items matching the work fax number
    mobile_phone        string      Will return all contact items matching the mobile phone number
    home_phone          string      Will return all contact items matching the home phone number
    address1            string      Will return all contact items matching the address1 field
    address2            string      Will return all contact items matching the address2 field
    city                string      Will return all contact items matching the city
    state               string      Will return all contact items matching the state
    zip                 string      Will return all contact items matching the zip
    description         string      Will return all contact items partially matching the description

    groups              string      A comma separated list of group names
                                    Format "group1,group2"
        Example:
        .../nimAPI.php?q=getContacts&groups=Group1,Group2

    keywords            string      A comma separated list of keywords
                                    Format "keyword1,keyword2"
        Example:
        .../nimAPI.php?q=getContacts&keywords=Sales,Marketing

    customKeys          dictionary  {"My Custom Key Name":"Some text","Another Custom Key":"Some other text"}
        Example:
        .../nimAPI.php?q=getContacts&customKeys={"My Custom Key Name":"Some text","Another Custom Key":"Some other text"}

    limit               integer     Specifies the maximum number of rows to return
                                    Default 0 (no limit)
    offset              integer     Specifies the number of rows to skip before starting to return rows.
                                    Default 0


Return:
    Returns an associative array in the format
    $result->success                True/False
    $result->error                  Includes any error or security messaging
    $result->total_count            The total number of rows that match the search criteria
    $result->data                   An array of returned data

Example:
    http://hostname:portnumber/nimAPI.php?q=getContacts&first_name=John&last_name=Smith

Add Contact

Creates a new contact in NIM

URL: http://hostname:portnumber/nimAPI.php?q=addContact

    Parameters          Type        Description
_________________________________________________________________________________________________________________________________

Optional:
    is_company          bool        0/1
    first_name          string      The first name of the contact
    last_name           string      The last name of the contact
    email               string      The email of the contact
    title               string      The title of the contact
    company             string      The company name for the contact
    website             string      The website of the contact
    work_phone          string      The work phone number of the contact
    work_fax            string      The fax number of the contact
    mobile_phone        string      The mobile phone number of the contact
    home_phone          string      The home phone number of the contact
    address1            string      The first address line of the contact
    address2            string      The second address line of the contact
    city                string      The city for the contact
    state               string      The state for the contact
    zip                 string      The zip code for the contact
    description         string      The description for the contact
    keywords            string      Format ["keyword1","keyword2"]
    groups              string      Format ["group1","group2"]
    contact_link_IDs    string      Format 1,2,3 - a comma separated list of contact IDs
                                    Will replace all linked contacts for this contact
    customKeys
        Example:
        .../nimAPI.php?q=addContact&first_name=John&last_name=Smith&customKeys={"My Custom Key Name":"Some text"}

    Return:
        Returns an associative array in the format
        $result->success            True/False
        $result->error              Includes any error or security messaging
        $result->ID                 The ID of the newly created item

    Example:
        https://hostname:portnumber/nimAPI.php?q=addContact&first_name=John&last_name=Smith

Update A Contact

Update an existing contact by ID If an optional field is not passed, the value for that field will remain unchanged.

URL: http://hostname:portnumber/nimAPI.php?q=updateContact

    Parameters          Type        Description
_________________________________________________________________________________________________________________________________

Required:
    ID                  integer     The ID of the contact to update

Optional:
    first_name          string      The first name of the contact
    last_name           string      The last name of the contact
    email               string      The email of the contact
    title               string      The title of the contact
    company             string      The company name for the contact
    website             string      The website of the contact
    work_phone          string      The work phone number of the contact
    work_fax            string      The fax number of the contact
    mobile_phone        string      The mobile phone number of the contact
    home_phone          string      The home phone number of the contact
    address1            string      The first address line of the contact
    address2            string      The second address line of the contact
    city                string      The city for the contact
    state               string      The state for the contact
    zip                 string      The zip code for the contact
    description         string      The description for the contact
    keywords            string      Format ["keyword1","keyword2"]
    groups              string      Format ["group1","group2"]
    contact_link_IDs    string      Format 1,2,3 - a comma separated list of contact IDs
                                    Will replace all linked contacts for this contact
    customKeys
        Example:
        .../nimAPI.php?q=updateContact&ID=8963&first_name=Jill&last_name=Stevens&customKeys={"My Custom Key Name":"Some text"}

    Return:
        Returns an associative array in the format
        $result->success            True/False
        $result->error              Includes any error or security messaging

    Example:
        http://hostname:portnumber/nimAPI.php?q=updateContact&ID=8963&first_name=Jill&last_name=Stevens

Delete A Contact

Delete an existing contact by ID

URL: http://hostname:portnumber/nimAPI.php?q=deleteContact

    Parameters          Type        Description
_________________________________________________________________________________________________________________________________

Required:
    ID                  integer     The ID of the contact to delete

Return:
    Returns an associative array in the format
    $result->success                True/False
    $result->error                  Includes any error or security messaging

Example:
    https://hostname:portnumber/nimAPI.php?q=deleteContact&ID=8978

Schedule Events

Get Schedule Events

Get Schedule Events based on search parameters

Note

This query can return a large amount of data. Use the limit and offset parameters in conjunction with the total_count value to paginate your results.

URL: http://hostname:portnumber/nimAPI.php?q=getScheduleEvents

    Parameters                  Type        Description
_________________________________________________________________________________________________________________________________

Required:
    none                                    Will return all schedule events the requesting user has access to

Optional:
    ID                          integer     The ID of a schedule event to query
    title                       string      Will return all schedule events matching the title
    description                 string      Will return all schedule events partially matching the description
    statusName                  string      Will return all schedule events matching the statusName
    locationName                string      Will return all schedule events matching the locationName
    jobName                     string      Will return all schedule events matching the jobName
    jobNumber                   string      Will return all schedule events matching the jobNumber
    userIDs                     string      Will return all schedule events matching the userIDs (comma separated list of IDs)
    users                       string      Will return all schedule events matching the users (comma separated list of names)
    resourceIDs                 string      Will return all schedule events matching the resourceIDs (comma separated list of IDs)
    resources                   string      Will return all schedule events matching the resources (comma separated list of names)
    start                       datetime    Will return all schedule events matching the start
                                            (yyyy-mm-ddThh:mm:ss.sssZ or yyyy-mm-dd hh:mm:ss.sss timezone)
    end                         datetime    Will return all schedule events matching the end
                                            (yyyy-mm-ddThh:mm:ss.sssZ or yyyy-mm-dd hh:mm:ss.sss timezone)
    startRange                  datetime    Will return all schedule events (and event recurrences) AFTER the startRange
                                            (yyyy-mm-ddThh:mm:ss.sssZ or yyyy-mm-dd hh:mm:ss.sss timezone)
    endRange                    datetime    Will return all schedule events (and event recurrences) BEFORE the endRange
                                            (yyyy-mm-ddThh:mm:ss.sssZ or yyyy-mm-dd hh:mm:ss.sss timezone)
    startTimezone               string      Will return all schedule events matching the startTimezone
    endTimezone                 string      Will return all schedule events matching the endTimezone
    isAllDay                    bool        Will return all schedule events matching the isAllDay (0/1)
    recurrenceId                integer     Will return all schedule events matching the recurrenceId
    recurrenceRule              string      Will return all schedule events matching the recurrenceRule
    recurrenceException         string      Will return all schedule events matching the recurrenceException
    userUtilizationTypeID       integer     Will return all schedule events matching the userUtilizationTypeID
    userUtilizationType         string      Will return all schedule events matching the userUtilizationType
    userUtilizationValue        string      Will return all schedule events matching the userUtilizationValue
    resourceUtilizationTypeID   integer     Will return all schedule events matching the resourceUtilizationTypeID
    resourceUtilizationType     string      Will return all schedule events matching the resourceUtilizationType
    resourceUtilizationValue    string      Will return all schedule events matching the resourceUtilizationValue

    limit                       integer     Specifies the maximum number of rows to return
                                            Default 0 (no limit)
    offset                      integer     Specifies the number of rows to skip before starting to return rows.
                                            Default 0


Return:
    Returns an associative array in the format
    $result->success                        True/False
    $result->error                          Includes any error or security messaging
    $result->total_count                    The total number of rows that match the search criteria
    $result->data                           An array of returned data

Notes:
    yyyy: 4-digit year (2024)
    mm: 2-digit month (07 for July)
    dd: 2-digit day of the month (10)
    T: A delimiter separating the date and time components
    hh: 2-digit hour in 24-hour format (07)
    mm: 2-digit minutes (00)
    ss: 2-digit seconds (00)
    .sss: Milliseconds (000), representing fractions of a second
    Z: Indicates that the time is in Coordinated Universal Time (UTC)

Examples:
    https://hostname:portnumber/nimAPI.php?q=getScheduleEvents&title=MyEvent

Examples of valid datetime strings:

    2024-07-10T07:00:00.000Z
    Represents July 10, 2024, 7:00:00 AM UTC

    2024-07-10 07:00:00.000 America/Los_Angeles
    Represents July 10, 2024, 7:00:00 AM in the America/Los_Angeles timezone

Add Schedule Event

Creates a new event on the schedule.

URL: http://hostname:portnumber/nimAPI.php?q=addScheduleEvent

    Parameters                  Type        Description
_________________________________________________________________________________________________________________________________

Required:
    start                       datetime    Date if isAllDay = 1; datetime otherwise
                                            (yyyy-mm-ddThh:mm:ss.sssZ or yyyy-mm-dd hh:mm:ss.sss timezone)
    end                         datetime     Date if isAllDay = 1; datetime otherwise
                                            (yyyy-mm-ddThh:mm:ss.sssZ or yyyy-mm-dd hh:mm:ss.sss timezone)
At least one of:
    jobID                       integer     A job ID to associate with the event
    userIDs                     string      Comma-separated list of user IDs
    resourceIDs                 string      Comma-separated list of resource IDs

Optional:
    title                       string      The title of the event
    description                 string      The description of the event
    statusID                    integer     The ID of the status to associate with the event
    statusName                  string      The name of the status to associate with the event
    locationID                  integer     The ID of the location to associate with the event
    jobID                       integer     The ID of the job to associate with the event
    userIDs                     string      Comma-separated list of user IDs
    resourceIDs                 string      Comma-separated list of resource IDs
    startTimezone               string      A valid timezone identifier; example: America/Los_Angeles
    endTimezone                 string      A valid timezone identifier; example: America/Los_Angeles
    isAllDay                    bool        0 or 1
    recurrenceId                integer     ID of this schedule event's parent; this should only exist if this event is an EXCEPTION to a recurring event's ruleset
    recurrenceRule              string      Recurring event ruleset string; see https://datatracker.ietf.org/doc/html/rfc5545
    recurrenceException         string      A list of comma-separated start datetimes for all exceptions to this recurring event's rules
    userUtilizationTypeID       integer     The ID of the user utilization type to associate with the event
    userUtilizationType         string      The name of the user utilization type to associate with the event
                                            Possible values are: "hours per day", "percent per day", "total hours"
    userUtilizationValue        string      The value of the user utilization type to associate with the event
    resourceUtilizationTypeID   integer     The ID of the resource utilization type to associate with the event
    resourceUtilizationType     string      The name of the resource utilization type to associate with the event
                                            Possible values are: "units per day", "percent per day"
    resourceUtilizationValue    string      The value of the resource utilization type to associate with the event


Return:
    Returns an associative array in the format
    $result->success                        True/False
    $result->error                          Includes any error or security messaging
    $result->ID                             The ID of the newly created item

Example:
    http://hostname:portnumber/nimAPI.php?q=addScheduleEvent&title=MyEvent&start=2024-07-10T07:00:00.000Z&end=2024-07-10T08:00:00.000Z&jobID=1&userIDs=1,2,3&resourceIDs=1,2,3

Update Schedule Event

Updates an existing schedule event by ID

URL: http://hostname:portnumber/nimAPI.php?q=updateScheduleEvent

    Parameters                  Type        Description
_________________________________________________________________________________________________________________________________

Required:
    ID                          integer     The ID of the schedule event to update

Optional:
    title                       string      The title of the event
    description                 string      The description of the event
    statusID                    integer     The ID of the status to associate with the event
    statusName                  string      The name of the status to associate with the event
    locationID                  integer     The ID of the location to associate with the event
    jobID                       integer     The ID of the job to associate with the event
    userIDs                     string      Comma-separated list of user IDs
    resourceIDs                 string      Comma-separated list of resource IDs
    start                       datetime    Date if isAllDay = 1; datetime otherwise
                                            (yyyy-mm-ddThh:mm:ss.sssZ or yyyy-mm-dd hh:mm:ss.sss timezone)
    end                         datetime    Date if isAllDay = 1; datetime otherwise
                                            (yyyy-mm-ddThh:mm:ss.sssZ or yyyy-mm-dd hh:mm:ss.sss timezone)
    startTimezone               string      A valid timezone identifier; example: America/Los_Angeles
    endTimezone                 string      A valid timezone identifier; example: America/Los_Angeles
    isAllDay                    bool        0 or 1
    recurrenceId                integer     ID of this schedule event's parent; this should only exist if this event is an EXCEPTION to a recurring event's ruleset
    recurrenceRule              string      Recurring event ruleset string; see https://datatracker.ietf.org/doc/html/rfc5545
    recurrenceException         string      A list of comma-separated start datetimes for all exceptions to this recurring event's rules
    userUtilizationTypeID       integer     The ID of the user utilization type to associate with the event
    userUtilizationType         string      The name of the user utilization type to associate with the event
    userUtilizationValue        string      The value of the user utilization type to associate with the event
    resourceUtilizationTypeID   integer     The ID of the resource utilization type to associate with the event
    resourceUtilizationType     string      The name of the resource utilization type to associate with the event
    resourceUtilizationValue    string      The value of the resource utilization type to associate with the event


Return:
    Returns an associative array in the format
    $result->success                        True/False
    $result->error                          Includes any error or security messaging

Example:
    http://hostname:portnumber/nimAPI.php?q=updateScheduleEvent&ID=8963&title=MyEvent

Delete A Schedule Event

Deletes an existing event from the schedule.

URL: http://hostname:portnumber/nimAPI.php?q=deleteScheduleEvent

    Parameters                  Type        Description
_________________________________________________________________________________________________________________________________

Required:
    ID                          integer     The ID of the schedule event to delete


Return:
    Returns an associative array in the format
    $result->success                        True/False
    $result->error                          Includes any error or security messaging

Example:
    https://hostname:portnumber/nimAPI.php?q=deleteScheduleEvent&ID=8978

Get Schedule Event Statuses

Get all schedule event statuses.

URL: http://hostname:portnumber/nimAPI.php?q=getScheduleEventStatuses

    Parameters                  Type        Description
_________________________________________________________________________________________________________________________________

None


Return:
    Returns an associative array in the format
    $result->success                        True/False
    $result->error                          Includes any error or security messaging
    $result->data                           An array of returned data

Example:
    https://hostname:portnumber/nimAPI.php?q=getScheduleEventStatuses

Resources

Get Resources

Get Resources based on search parameters. The query will return all resources the requesting user has access to.

Note

This query can return a large amount of data. Use the limit and offset parameters in conjunction with the total_count value to paginate your results.

URL: http://hostname:portnumber/nimAPI.php?q=getResources

    Parameters                  Type        Description
_________________________________________________________________________________________________________________________________

Required:
    none

Optional:
    ID                          integer     The ID of a resource to query
    name                        string      Will return all resources matching the name
    description                 string      Will return all resources partially matching the description
    color                       string      Will return all resources matching the color
    locationID                  integer     Will return all resources matching the location ID
    locationName                string      Will return all resources matching the locationName
    keywordIDs                  string      Will return all resources matching the keywordIDs (comma separated list of IDs)
    keywords                    string      Will return all resources matching the keywords (comma separated list of names)
    resourceGroupIDs            string      Will return all resources matching the resourceGroupIDs (comma separated list of IDs)
    resourceGroups              string      Will return all resources matching the resourceGroups (comma separated list of names)

    limit                       integer     Specifies the maximum number of rows to return
                                            Default 0 (no limit)
    offset                      integer     Specifies the number of rows to skip before starting to return rows.
                                            Default 0


Return:
    Returns an associative array in the format
    $result->success                        True/False
    $result->error                          Includes any error or security messaging
    $result->total_count                    The total number of rows that match the search criteria
    $result->data                           An array of returned data

Examples:
    https://hostname:portnumber/nimAPI.php?q=getResources&name=MyResource

Add A Resource

Creates a new resource in NIM

URL: http://hostname:portnumber/nimAPI.php?q=addResource

    Parameters                  Type        Description
_________________________________________________________________________________________________________________________________

Required:
    name                        string      The resource name

Optional:
    description                 string      The resource description
    color                       string      The resource color
    locationID                  integer     The location ID to associate with the resource
    keywords                    string      Comma-separated list of keywords
    keywordIDs                  string      Comma-separated list of keyword IDs
    resourceGroups              string      Comma-separated list of resource groups
    resourceGroupIDs            string      Comma-separated list of resource group IDs

Return:
    Returns an associative array in the format
    $result->success                        True/False
    $result->error                          Includes any error or security messaging
    $result->ID                             The ID of the newly created item

Example:
    https://hostname:portnumber/nimAPI.php?q=addResource&name=MyEvent

Update A Resource

Updates an existing resource based on the resource ID

URL: http://hostname:portnumber/nimAPI.php?q=updateResource

    Parameters                  Type        Description
_________________________________________________________________________________________________________________________________

Required:
    ID                          integer     The ID of the resource to update

Optional:
    name                        string      The resource name
    description                 string      The resource description
    color                       string      The resource color
    locationID                  integer     The location ID to associate with the resource
    keywords                    string      Comma-separated list of keywords
    keywordIDs                  string      Comma-separated list of keyword IDs
    resourceGroups              string      Comma-separated list of resource groups
    resourceGroupIDs            string      Comma-separated list of resource group IDs

Return:
    Returns an associative array in the format
    $result->success                        True/False
    $result->error                          Includes any error or security messaging

Example:
    https://hostname:portnumber/nimAPI.php?q=updateResource&ID=8963&name=MyEvent

Delete A Resource

Deletes an existing resource based on the resource ID

URL: http://hostname:portnumber/nimAPI.php?q=deleteResource

    Parameters                  Type        Description
_________________________________________________________________________________________________________________________________

Required:
    ID                          integer     The ID of the resource to delete

Return:
    Returns an associative array in the format
    $result->success                        True/False
    $result->error                          Includes any error or security messaging

Example:
        https://hostname:portnumber/nimAPI.php?q=deleteResource&ID=8978

Jobs

Get User Jobs

Retrieves all jobs the user is assigned to.

URL: http://hostname:portnumber/nimAPI.php?q=getUserJobs

    Parameters              Description                                  Type            Values                      Default        Required
_____________________________________________________________________________________________________________________________________________

    u                       User ID to retrieve jobs                     integer                                                    YES


Return:
    ID
    number
    jobname
    folder

Get Crew

Returns an array of users for the crew of the corresponding job(s)

Note

This query can return a large amount of data. Use the limit and offset parameters in conjunction with the total_count value to paginate your results.

URL: http://hostname:portnumber/nimAPI.php?q=getCrew

    Parameters                  Type        Description
_________________________________________________________________________________________________________________________________

Required:
    jobID                       string      single ID or comma separated list of IDs

Optional:
    getData                     0 / 1       0 or not included - only returns IDs
                                            1 - returns full data for items

    limit                       integer     Specifies the maximum number of rows to return
                                            Default 0 (no limit)
    offset                      integer     Specifies the number of rows to skip before starting to return rows.


Return:
    Returns an associative array in the format
    $result->success                        True/False
    $result->error                          Includes any error or security messaging
    $result->total_count                    The total number of rows without the limit
    $result->data                           An array of the data requested
            - job_id
                - crew
                    - user_id
                    - first_name
                    - last_name
                    - email

Add Job

Creates a new job.

If no default job number template is set, either number or numberTemplate must be included.

URL: http://hostname:portnumber/nimAPI.php?q=addJob

    Parameters              Type            Values                      Default        Required
________________________________________________________________________________________________

    name                    string                                                     YES
    number                  string
    numberTemplate          string
    description             string
    client_details          string
    agency                  string
    producer                string
    agency_producer         string
    phone                   string
    email                   string
    prod_co                 string
    prod_director           string
    prod_contact            string
    prod_phone              string
    prod_email              string
    prod_shoot_date         date            YYYY-mm-dd
    prod_location           string
    prod_supervised         boolean         0/1                         0
    editorial               string
    editor                  string
    grading                 string
    colorist                string
    music                   string
    mix                     string
    sound                   string
    creative_lead           string

    projectStatus           string          ACTIVE / INACTIVE           ACTIVE
                                            Including a "projectStatus" will override any job status associated activity status.

    folder                  string

    projectStructureID OR projectStructure
        projectStructureID  integer
        projectStructure    string

    jobStatusID OR jobStatus                Including the job status will set the project status based on the associated activity status.
        jobStatusID         integer
        jobStatus           string

    biddingLocationID OR biddingLocation
        biddingLocationID   integer
        biddingLocation     string

    assignedLocationID OR assignedLocation
        assignedLocationID  integer
        assignedLocation    string

    start_date              date            YYYY-mm-dd
    end_date                date            YYYY-mm-dd
    currency                string          3 digit currency code                   DEPRECATED
                                            cultureID should be used instead of currency
                                            If currency is set instead of cultureID, NIM will use the first matching cultureID
    cultureID               integer         The ID of the currency culture to use for the job
    keywords                array           ["keyword1","keyword2"]
    contactIDs              string          A comma separated list of contact IDs to link to the job
                                            Example: 1,2,3
    customKeys              dictionary      {"Custom Key Name" : "Value"}


Example:
    .../nimAPI.php?q=addJob&number=1&name=MyNewJob&customKeys={"My Custom Key Name":"Some text"}

Notes:
    If no default job number template is set, either number or numberTemplate must be included

Return:
    JSON Array

Update Job

Updates an existing job based on the jobID.

The following values will only be updated if the job is offline:

folder projectStructureID projectStructure

URL: http://hostname:portnumber/nimAPI.php?q=updateJob

    Parameters              Type            Values                      Default        Required
________________________________________________________________________________________________

    jobID                   integer                                                    YES
    name                    string
    number                  string
    description             string
    client_details          string
    agency                  string
    producer                string
    agency_producer         string
    phone                   string
    email                   string
    prod_co                 string
    prod_director           string
    prod_contact            string
    prod_phone              string
    prod_email              string
    prod_shoot_date         string          YYYY-mm-dd
    prod_location           string
    prod_supervised         boolean         0 / 1                       0
    editorial               string
    editor                  string
    grading                 string
    colorist                string
    music                   string
    mix                     string
    sound                   string
    creative_lead           string

    projectStatus           string          ACTIVE / INACTIVE           ACTIVE
                                            Providing a "projectStatus" will override any job status associated activity status.

    folder                  string

    projectStructureID OR projectStructure
        projectStructureID  integer
        projectStructure    string

    jobStatusID OR jobStatus                Including the job status will set the project status based on the associated activity status.
        jobStatusID         integer
        jobStatus           string

    biddingLocationID OR biddingLocation
        biddingLocationID   integer
        biddingLocation     string

    assignedLocationID OR assignedLocation
        assignedLocationID  integer
        assignedLocation    string

    start_date              date            YYYY-mm-dd
    end_date                date            YYYY-mm-dd
    currency                string          3 digit currency codes                      DEPRECATED
                                            cultureID should be used instead of currency
                                            If currency is set instead of cultureID, NIM will use the first matching cultureID
    cultureID               integer         The ID of the currency culture to use for the job
    keywords                array           ["keyword1","keyword2"]
    contactIDs              string          A comma separated list of contact IDs to link to the job
                                            Example: 1,2,3
    customKeys              dictionary      {"Custom Key Name" : "Value"}

Example:
    .../nimAPI.php?q=updateJob&jobID=1&customKeys={"My Custom Key Name":"Some text"}

Return:
    JSON Array

Delete Job

Deletes a job based on jobID.

This is a soft delete and these jobs can be recovered or permanently deleted from the Admin UI.

URL: http://hostname:portnumber/nimAPI.php?q=deleteJob

    Parameters              Type            Values                      Default        Required
________________________________________________________________________________________________

    jobID                   integer                                                    YES

Return:
    JSON Array
    [{"success","true"},{"error",""}]

Upload Job Icon

Uploads a new job icon for a specified job ID. File information for the image to be uploaded needs to be included in the $_FILES directive.

URL: http://hostname:portnumber/nimAPI.php?q=uploadJobIcon

    Parameters              Type            Values                      Default        Required
________________________________________________________________________________________________

    jobID                   integer                                                    YES

Return:

Get Job Info

Retrieves job information for a specified job ID. Returns limited data if user does not have permission to view job details.

URL: http://hostname:portnumber/nimAPI.php?q=getJobInfo

    Parameters              Type            Values                      Default        Required
________________________________________________________________________________________________

    jobID                   integer                                                    YES

Return:
    Object
        success - true or false
        iconPath - if successful the path to the uploaded media will be returned
        error - any associated error message

Find Jobs

Retrieves job IDs or full job data based on search parameters.

Note

This query can return a large amount of data. Use the limit and offset parameters in conjunction with the total_count value to paginate your results.

URL: http://hostname:portnumber/nimAPI.php?q=findJobs

    Parameters                  Type        Description
_________________________________________________________________________________________________________________________________

Optional:
    getData                     0 / 1       0 - returns IDs (default)
                                            1 - returns full data for item
                                            Returns limited data if user does not have permission to view job details
    ID                          int         Allows comma separated list
    name                        string      Will partially match the job name
    number                      string      Will match the job number
    description                 string      Will partially match the job description
    startDate                   date        YYYY-MM-DD
    endDate                     date        YYYY-MM-DD
    jobStatusID                 int         Job Status ID
    jobStatus                   string      Job Status Name
    folder                      string      The job folder name
    client_contactID            int         The ID of a linked contact
                                            Allows comma separated list
    client_details              string      Will partially match the client details
    biddingLocationID           int         ID of the corresponding locations
                                            Allows comma separated list
    biddingLocation             string      Name of the bidding location
    assignedLocationID          int         ID of the corresponding locations
                                            Allows comma separated list
    assignedLocation            string      Name of the assigned location
    currency                    string      Currency code (USD, EUR, etc)
    is_private                  int         (0, 1)
    agency                      string      Agency
    agency_producer             string      Agency Producer
    agency_phone                string      Agency Phone
    agency_email                string      Agency Email
    production_company          string      Production Company
    director                    string      Directory
    prod_contact                string      Production Contact
    prod_phone                  string      Production Phone
    prod_email                  string      Production Email
    producer                    string      Producer
    creative_lead               string      Creative Lead
    grading                     string      Grading
    colorist                    string      Colorist
    editorial                   string      Editorial
    editor                      string      Editor
    mix                         string      Mix
    music                       string      Music
    sound_design                string      Sound Design
    shoot_date                  date        YYYY-MM-DD
    shoot_location              string      Shoot Location
    supervised                  int         (0, 1)
    proj_status                 string      (ONLINE, OFFLINE)
    activity                    string      (ACTIVE, INACTIVE)
    keywords                    array       Allows comma separated list
                                            Example: keyword1,keyword2
    customKeys                  dictionary  A dictionary of custom key names and values
                                            Example: {"My Custom Key Name":"Some text","Another Custom Key":"Some other text"}

    include_deleted             0/1         1 - include deleted jobs

    limit                       integer     specifies the maximum number of rows to return
                                            default 0 (no limit)
    offset                      integer     specifies the number of rows to skip before starting to return rows.
                                            default 0

Return :
    Returns an associative array in the format
    $result->success                        True/False
    $result->error                          Includes any error or security messaging
    $result->total_count                    The total number of rows without the limit
    $result->data                           An array of the data requested


Example:
    .../nimAPI.php?q=findJobs&customKeys={"My Custom Key Name":"Some text","Another Custom Key":"Some other text"}

Get Job Statuses

Returns the list of available job statuses

URL: http://hostname:portnumber/nimAPI.php?q=getJobStatuses

Return:
    Object
        success - true or false
        error - any associated error message
        data - an array of job statuses
                - ID
                - name
                - priority
                - bgcolor
                - textcolor

Servers & Project Structure

Get All Servers

Retrieves all servers optionally filtered by locationID

URL: http://hostname:portnumber/nimAPI.php?q=getServers

PARAMS:
    ID - location ID

    Parameters              Description                                  Type            Values                      Default        Required
_____________________________________________________________________________________________________________________________________________

    ID                      Optional filter by location                  integer

Return:
    ID
    server
    description
    locationID
    mountpoint
    mountsource
    path
    winPath
    osxPath
    priority
    is_projServer

Get Job Servers

Retrieves servers associated with a specified job ID

URL: http://hostname:portnumber/nimAPI.php?q=getJobServers

    Parameters              Description                                  Type            Values                      Default        Required
_____________________________________________________________________________________________________________________________________________

    ID                      Job ID                                       integer                                                    YES

RETURN:
    ID
    server
    description
    locationID
    mountpoint
    mountsource
    path
    winPath
    osxPath
    priority
    is_projServer

Get Server Info

Retrieves servers information from server ID

URL: http://hostname:portnumber/nimAPI.php?q=getServerInfo

    Parameters              Type            Values                      Default        Required
________________________________________________________________________________________________

    ID                      integer                                                    YES


RETURN:
    ID
    server
    description
    locationID
    mountpoint
    mountsource
    path
    winPath
    osxPath
    priority
    is_projServer

Get Server OS Path

Returns the path to the server based on OS type.

URL: http://hostname:portnumber/nimAPI.php?q=get_serverOSPath

    Parameters              Description         Type            Values                      Default        Required
____________________________________________________________________________________________________________________

    ID                      ID of the server    integer                                                    YES
    os                      OS Type             string          win,Windows,osx,mac,        Linux          YES
                                                                Darwin, Linux

Return:
    serverOSPath

Get OS Path

Retrieves file path based on file ID and OS type.

URL: http://hostname:portnumber/nimAPI.php?q=getOSPath&fileID=ID&os=osType

    Parameters              Description         Type            Values                      Default        Required
____________________________________________________________________________________________________

    ID                      ID of the server    integer                                                    YES
    os                      OS Type             string          win,Windows,osx,mac,        Linux          YES
                                                                Darwin, Linux

Return:
    path

Get Asset Master OS Path

Returns the path to the Asset Master based on asset ID and OS type.

URL: http://hostname:portnumber/nimAPI.php?q=getAssetMasterOSPath

    Parameters          Description              Type            Values                      Default        Required
_____________________________________________________________________________________________________________________

    assetID             Asset ID                 integer                                                    YES
    os                  OS Type                  string          win,Windows,osx,mac,        Linux          YES
                                                                 Darwin, Linux

RETURN:
    path

Get Paths

Retrieves the NIM path for a project structure given the item ID and the path item to look for.

Type Options:
  • job (PROJECT ROOT)

  • asset (ASSET ROOT, ASSET COMPS, ASSET RENDERS)

  • show (SHOW ROOT)

  • shot (SHOT ROOT, SHOT PLATES, SHOT COMPS, SHOT RENDERS)

URL: http://hostname:portnumber/nimAPI.php?q=getPaths


    Parameters              Type            Values                      Default        Required
________________________________________________________________________________________________

    ID                      integer                                                    YES
    item                    string          job, show, shot, asset                     YES

RETURN:
    path

Resolve Server OS Path

Given a path string, this function will look for matching NIM server and return an OS centric path based on the os name provided.

URL: http://hostname:portnumber/nimAPI.php?q=resolveOSPath


    Parameters              Type            Values                      Default        Required
________________________________________________________________________________________________

    os                      string          linux, win, osx                            YES
    path                    string                                                     YES

RETURN:
    path

Can Bring Online

Tests item against project structure to see if it can be brought online.

Item types can be asset or shot
  • If asset, jobID OR assetID must be passed

  • If shot, showID or shotID must be passed

URL: http://hostname:portnumber/nimAPI.php?q=canBringOnline

    Parameters              Type            Values                      Default        Required
________________________________________________________________________________________________

    item                    string          shot, asset                 shot           YES
    jobID                   integer                                                    ---
    assetID                 integer                                                    ---
    showID                  integer                                                    ---
    shotID                  integer                                                    ---


Return:
    1 if the item can be brought online or 0 if not.

Bring Online

Brings assets and shots online creating folders from project structure

Item types can be asset or shot
  • If asset, assetID must be passed

  • If shot, shotID must be passed

CMD: http://hostname:portnumber/nimAPI.php?q=bringOnline

    Parameters              Type            Values                      Default        Required
________________________________________________________________________________________________

    type                    string          shot, asset                 shot           YES
    assetID                 integer
    shotID                  integer

RETURN:
    success - true or false
    error - error message passed here if failed to bring item online

Assets

Get Assets

Returns all assets for a given job id

URL: http://hostname:portnumber/nimAPI.php?q=getAssets

    Parameters      Description        Type            Values                      Default        Required
___________________________________________________________________________________________________________

    ID              The job ID         integer                                                    YES


Return:
    ID
    name

Add Assets

Adds a new asset to a job and returns the new assetID.

If an asset with the specified name already exists, NIM wil update the existing asset instead of creating a new one with a duplicate name.

An asset status can be passed by either name or ID.

If both are passed the ID will be used.

URL: http://hostname:portnumber/nimAPI.php?q=addAsset

    Parameters              Type            Values                      Default        Required
________________________________________________________________________________________________

    jobID                   integer                                                    YES
    name                    string                                                     YES
    assetStatusID           integer
    assetStatus             string
    description             string
    customKeys              dictionary {"Custom Key Name" : "Value"}

Example:
    .../nimAPI.php?q=addAsset&jobID=1&name=MyNewAsset&customKeys={"My Custom Key Name":"Some text"}

Return:
    JSON Array

Update Assets

Updates an existing asset based on the assetID.

An asset status can be passed by either name or ID. If both are passed the ID will be used.

URL: http://hostname:portnumber/nimAPI.php?q=updateAsset

    Parameters              Type            Values                      Default        Required
________________________________________________________________________________________________

    assetID                 integer                                                    YES
    assetStatusID           integer
    assetStatus             string
    description             string
    customKeys              dictionary {"Custom Key Name" : "Value"}

Example:
    .../nimAPI.php?q=updateAsset&assetID=1&customKeys={"My Custom Key Name":"Some text"}

Return:
    JSON Array

Delete Assets

Deletes an asset based on assetID.

URL: http://hostname:portnumber/nimAPI.php?q=deleteAsset

    Parameters              Type            Values                      Default        Required
________________________________________________________________________________________________

    assetID                 integer                                                    YES

Return:
    JSON Array

Upload Asset Icon

Uploads a thumbnail for an asset

URL: http://hostname:portnumber/nimAPI.php?q=upload_assetIcon

The $_FILES directive must contain file for upload

    Parameters              Type            Values                      Default        Required
________________________________________________________________________________________________

    assetID                 integer                                                    YES

Return:
    success - true or false
    error - will contain any generated error messages

Get Asset Info

Retrieves information for the asset(s) from the asset ID or comma separated list of asset IDs.

URL: http://hostname:portnumber/nimAPI.php?q=getAssetInfo

    Parameters              Type                                      Default        Required
________________________________________________________________________________________________

    ID                      integer or comma separated list of IDs                   YES


Return:
    jobID
    jobFolder
    jobNumber
    jobName
    AMR_path
    AMR_filename
    assetName

Get Asset Icon

Retrieves the path to the asset’s icon for a given assetID

URL: http://hostname:portnumber/nimAPI.php?q=getAssetIcon

    Parameters              Type            Values                      Default        Required
________________________________________________________________________________________________

    ID                      integer                                                    YES

Return:
    img_link

Get Asset Statuses

Returns the list of available asset statuses

URL: http://hostname:portnumber/nimAPI.php?q=getAssetStatuses

Return:
    Object
        success - true or false
        error - any associated error message
        data - an array of asset statuses
                - ID
                - name
                - priority
                - bgcolor
                - textcolor
                - task_status_ID - the task status ID associated with the asset status

Shows

Get Shows

Returns all shows for a given job id

URL: http://hostname:portnumber/nimAPI.php?q=getShows

    Parameters              Type            Values                      Default        Required
________________________________________________________________________________________________

    ID                      integer                                                    YES

Return:
    ID
    showname
    folder

Get Show Info

Returns all show information for a given show id

URL: http://hostname:portnumber/nimAPI.php?q=getShowInfo

    Parameters              Type            Values                      Default        Required
________________________________________________________________________________________________

    ID                      integer                                                    YES

RETURN:
    ID
    jobID
    showname
    folder
    show_status
    trt
    previs_id
    is_previs
    has_previs

Add Show

Adds a new show to a job and returns the new showID

URL: http://hostname:portnumber/nimAPI.php?q=addShow

    Parameters              Type            Values                      Default        Required
________________________________________________________________________________________________

    jobID                   integer                                                    YES
    name                    string                                                     YES
    trt                     string          00:00:00:00
    has_previs              boolean         0/1  (a value of 1 will create an associated previs show)

Return:
    JSON Array

Update Show

Updates an existing show based on the showID.

Show name will only be updated if the show is offline.

URL: http://hostname:portnumber/nimAPI.php?q=updateShow

    Parameters              Type            Values                      Default        Required
________________________________________________________________________________________________

    showID                  integer                                                    YES
    name                    string
    trt                     string          00:00:00:00

Return:
    JSON Array

Delete Show

Deletes an existing show based on the showID.

URL: http://hostname:portnumber/nimAPI.php?q=deleteShow

    Parameters              Type            Values                      Default        Required
________________________________________________________________________________________________

    showID                  integer                                                    YES

Return:
    JSON Array

Shots

Get Shots

Returns all shots for a given show id

URL: http://hostname:portnumber/nimAPI.php?q=getShots

    Parameters              Type            Values                      Default        Required
________________________________________________________________________________________________

    ID                      integer                                                    YES

Return:
    ID
    name

Add Shot

Adds a shot to a show and returns the new ID.

If a shot with the specified name already exists, NIM will update the existing shot instead of creating a new one with a duplicate name.

A shot status can be passed by either name or ID. If both are passed the ID will be used.

URL: http://hostname:portnumber/nimAPI.php?q=addShot

    Parameters              Type            Values                      Default        Required
________________________________________________________________________________________________

    showID                  integer                                                    YES
    name                    string                                                     YES
    shotStatusID            integer
    shotStatus              string
    description             string
    vfx                     string
    fps                     string
    frames/shotDuration     string
    handles                 string
    heads                   string
    tails                   string
    height                  string
    pan                     string
    tilt                    string
    roll                    string
    lens                    string
    fstop                   string
    filter                  string
    dts                     string
    focus                   string
    ia                      string
    convergence             string
    cam_roll                string
    stock                   string
    format                  string
    crop                    string
    protect                 string
    customKeys              dictionary {"Custom Key Name" : "Value"}

Example:
    .../nimAPI.php?q=addShot&showID=1&name=MyNewShot&customKeys={"My Custom Key Name":"Some text"}

Return:
    JSON Array

Update Shot

Updates an existing shot based on the shotID.

A shot status can be passed by either name or ID. If both are passed the ID will be used.

URL: http://hostname:portnumber/nimAPI.php?q=updateShot

    Parameters              Type            Values                      Default        Required
________________________________________________________________________________________________

    shotID                  integer                                                    YES
    shotStatusID            integer
    shotStatus              string
    description             string
    vfx                     string
    fps                     string
    frames/duration         string
    handles                 string
    heads                   string
    tails                   string
    height                  string
    pan                     string
    tilt                    string
    roll                    string
    lens                    string
    fstop                   string
    filter                  string
    dts                     string
    focus                   string
    ia                      string
    convergence             string
    cam_roll                string
    stock                   string
    format                  string
    crop                    string
    protect                 string
    customKeys              dictionary {"Custom Key Name" : "Value"}

Example:
    .../nimAPI.php?q=updateShot&shotID=1&customKeys={"My Custom Key Name":"Some text"}

Return:
    JSON Array

Delete Shot

Deletes a shot based on shotID.

URL: http://hostname:portnumber/nimAPI.php?q=deleteShot

    Parameters              Type            Values                      Default        Required
________________________________________________________________________________________________

    shotID                  integer                                                    YES

Return:
    JSON Array

Upload Shot Icon

Uploads a thumbnail for a shot

URL: http://hostname:portnumber/nimAPI.php?q=upload_shotIcon

The $_FILES directive must contain file for upload

    Parameters              Type            Values                      Default        Required
________________________________________________________________________________________________

    shotID                  integer                                                    YES

RETURN:
    success - true or false
    error - will contain any generated error messages

Get Shot Info

Retrieves information for the shot(s) from the shot ID or comma separated list of shot IDs.

URL: http://hostname:portnumber/nimAPI.php?q=getShotInfo

    Parameters              Type                                      Default        Required
________________________________________________________________________________________________

    ID                      integer or comma separated list of IDs                   YES

RETURN:
    jobID
    jobFolder
    jobNumber
    jobName,
    showID
    showFolder
    showName
    shotName

Get Shot Icon

Retrieves the path to the shot’s icon for a given shotID

URL: http://hostname:portnumber/nimAPI.php?q=getShotIcon

    Parameters              Type            Values                      Default        Required
________________________________________________________________________________________________

    ID                      integer                                                    YES

RETURN:
    img_link

Get Shot Statuses

Returns the list of available shot statuses.

URL: http://hostname:portnumber/nimAPI.php?q=getShotStatuses

Return:
    Object
        success - true or false
        error - any associated error message
        data - an array of shot statuses
                - ID
                - name
                - priority
                - bgcolor
                - textcolor
                - task_status_ID - the task status ID associated with the shot status

Tasks

Get Task Types

Retrieves the available task types from the API, optionally filtering down to only task types that are associated with files on a specific shot or asset.

URL: http://hostname:portnumber/nimAPI.php?q=getTaskTypes


    Parameters              Description                                         Type            Values                         Default        Required
_______________________________________________________________________________________________________________________________________________________

    app                     Optional filter by application                      string          MAYA, C4D, AE, NUKE,           all
                                                                                                HIERO, PHOTOSHOP, 3DSMAX,
                                                                                                HOUDINI, FLAME, all            artist
    type                    Optional filter by role type                        string          artist, producer, management
                                                                                                all
    assetID                 Include tasks used on assetID                       integer
    shotID                  Include tasks used on shotID                        integer
    onlyWithFiles           Flag to return only task types that are associated  integer         0 or 1                         0
                            with files on provided shot or asset
    pub                     Optional filter for the onlyWithFiles flag to       integer         0 or 1                         0
                            return only task types with published files


RETURN:
    ID
    name
    folder

Add Task

Adds a new task to an asset or shot.

AssetID or shotID can be passed. If both are passed, assetID will be used.

The task type can be determined by passing taskTypeID or taskTypeName. If both are passed, taskTypeID will be used.

A user can be attached to the task by passing either userID or username. If both are passed, userID will be used.

URL: http://hostname:portnumber/nimAPI.php?q=addTask

    Parameters              Type                   Values                      Default        Required
_______________________________________________________________________________________________________

    assetID or shotID                                                                         YES
        assetID             integer
        shotID              integer

    taskTypeID or taskTypeName                                                                YES
        taskTypeID          integer
        taskTypeName        string

    userID OR username
        userID              integer
        username            string

    taskStatusID OR taskStatus
        taskStatusID        integer
        taskStatus          string

    description             string
    estimated_hours         float
    startDate               UTC datetime string    "2017-01-01 08:00:00"
    endDate                 UTC datetime string    "2017-01-01 08:00:00"
    customKeys              dictionary             {"Custom Key Name" : "Value"}

Example:
    .../nimAPI.php?q=addTask&assetID=1&taskTypeID=1&customKeys={"My Custom Key Name":"Some text"}

Return:
    JSON Array

Update Task

Updates an existing task based on taskID.

The task type can be determined by passing taskTypeID or taskTypeName. If both are passed, taskTypeID will be used.

A user can be attached to the task by passing either userID or username. If both are passed, userID will be used.

URL: http://hostname:portnumber/nimAPI.php?q=updateTask

    Parameters              Type                      Values                      Default        Required
__________________________________________________________________________________________________________

    taskID                  integer                                                              YES

    taskTypeID or taskTypeName
        taskTypeID          integer
        taskTypeName        string

    userID OR username
        userID              integer
        username            string

    taskStatusID OR taskStatus
        taskStatusID        integer
        taskStatus          string

    description             string
    estimated_hours         float
    startDate               UTC datetime string      "2017-01-01 08:00:00"
    endDate                 UTC datetime string      "2017-01-01 08:00:00"
    customKeys              dictionary               {"Custom Key Name" : "Value"}

Example:
    .../nimAPI.php?q=updateTask&taskID=1&customKeys={"My Custom Key Name":"Some text"}

Return:
    JSON Array

Delete Task

Deletes a task based on taskID.

URL: http://hostname:portnumber/nimAPI.php?q=deleteTask

    Parameters              Type                      Values                      Default        Required
__________________________________________________________________________________________________________

    taskID                  integer                                                              YES

Return:
    JSON Array

Get Task Info

Retrieves information about one or more tasks.

Given the taskID passed as ID, this function will return the information for a single task.

Given the itemID for an asset or shot and setting the class to “asset” or “shot” will return information for all tasks for the respective item.

CMD: http://hostname:portnumber/nimAPI.php?q=getTaskInfo

    Parameters              Type                      Values                      Default        Required
__________________________________________________________________________________________________________

    ID                      integer                                                              ---
    itemID                  integer                                                              ---
    class                   string                    asset/shot                                 ---


RETURN:
    taskID
    taskDesc
    taskName
    username

Get Task Statuses

Returns the list of available task statuses.

URL: http://hostname:portnumber/nimAPI.php?q=getTaskStatuses

Return:
    Object
        success - true or false
        error - any associated error message
        data - an array of task statuses
                - ID
                - status
                - type
                - priority
                - bgcolor
                - textcolor

Files

Get Element Exports

Retrieves all element export settings for a given file ID Used in conjunction with setting Photoshop export settings

URL: http://hostname:portnumber/nimAPI.php?q=getElementExport

    Parameters              Type                      Values                      Default        Required
__________________________________________________________________________________________________________

    ID                      integer                                                              YES

Return:
    JSON array of settings used by the Photoshop connector

Set Element Exports

Sets the element export settings for a given file ID Used in conjunction with setting Photoshop export settings

URL: http://hostname:portnumber/nimAPI.php?q=setElementExports

    Parameters              Type                      Values                      Default        Required
__________________________________________________________________________________________________________

    fileID                  integer                                                              YES
    exports                 array                                                                YES

Parameter Details:
    fileID - the ID of the file to associate the element export settings
    exports - an array of export settings used by the NIM Photoshop connector

        The export array requires the following settings:

            isElement
            elementTypeID
            export
            extension
            bitDepth
            resolution
            epsPreview
            epsEncoding
            epsHalftone
            epsTransferFunction
            epsPostScriptColor
            epsVectorData
            epsInterpolation
            jpgQuality
            jpgFormat
            jpgScans
            pngCompression
            pngInterlaced
            tgaResolution
            tgaCompress
            tifImageCompression
            tifSaveImagePyramid
            tifSaveTransparency
            tifPixelOrder
            tifByteOrder
            tifLayerCompression

Return:
    JSON Araay

Get Basenames

Returns all basenames for a show, shot, or asset.

CMD: http://hostname:portnumber/nimAPI.php?q=getBasenames

    Parameters                  Description                                  Type            Values                      Default        Required
_____________________________________________________________________________________________________________________________________________

    ID                          The parent ID                                integer                                                    YES
    class                       The parent class                             string          asset, shot, show                          YES
    type / taskType             Task type Name to filter results             string
    task_type_ID / taskTypeID   Task type ID to filter results               integer
    pub                         Filter to only return published basenames    boolean         True/False

Return:
    basename

Get Published Basename

Retrieves information for the published file for a given basename.

The optional username is used to return the date information in the users selected timezone.

URL: http://hostname:portnumber/nimAPI.php?q=getBasenamePub

    Parameters              Type            Values                      Default        Required
________________________________________________________________________________________________

    class                   string          asset, shot, show                          YES
    itemID                  integer                                                    YES
    basename                string                                                     YES
    username                string

RETURN:
    fileID
    fileClass
    parentID
    serverID
    task_type
    task_type_ID
    task_type_folder
    basename
    filename
    filepath
    ext
    version
    isPublished
    isWorking
    note
    userID
    username
    date
    metadata
    customKeys

Get All Published Basenames

Retrieves all published basename files for a given asset or shot filtered by task type.

The “type” parameter is the task type name.

The optional username is used to return the date information in the users selected timezone.

URL: http://hostname:portnumber/nimAPI.php?q=getBasenameAllPub

    Parameters              Type            Values                      Default        Required
________________________________________________________________________________________________

    class                   string          asset, shot, show                          YES
    itemID                  integer                                                    YES
    type                    string                                                     YES if task_type_ID is not passed
    task_type_ID            integer                                                    YES if type is not passed
    username                string

RETURN:
    fileID
    fileClass
    parentID
    serverID
    task_type
    task_type_ID
    task_type_folder
    basename
    filename
    filepath
    ext
    version
    isPublished
    isWorking
    note
    userID
    username
    date
    metadata
    customKeys

Get Basename Info

Retrieves all basenames and their max version for given asset, shot, or show based on ID

URL: http://hostname:portnumber/nimAPI.php?q=getBasenamesInfo

    Parameters              Type            Values                      Default        Required
________________________________________________________________________________________________

    ID                      integer                                                    YES
    class                   string          show, shot, asset                          YES
    task_type_ID            ID                                                         YES

Return:
    JSON Array

Get Basename Version

Retrieves the highest version number for a given basename on an asset, shot, or show based on ID

URL: http://hostname:portnumber/nimAPI.php?q=getBasenameVersion

    Parameters              Type            Values                      Default        Required
________________________________________________________________________________________________

    class                   string          show,shot,asset                            YES
    itemID                  integer
    basename                string                                                     YES

Return:
    ID                      The file ID for the returned version
    basename                The basename of the returned version
    version                 The version number

Get Versions

Retrieves the versions for a given basename.

The optional username is used to return the date information in the users selected timezone.

URL: http://hostname:portnumber/nimAPI.php?q=getVersions

    Parameters              Description                                  Type            Values                      Default        Required
_____________________________________________________________________________________________________________________________________________

    class                   The parent class type                        string          show,shot,asset                            YES
    itemID                  The parent ID                                integer                                                    YES
    basename                The basename in which to find versions       string                                                     YES
    pub                     Filter to only return published basenames    boolean         1/0                         0
    username                User to set timezone                         string


Return:
    fileID
    fileClass
    parentID
    serverID
    task_type
    task_type_ID
    task_type_folder
    basename
    filename
    filepath
    ext
    version
    isPublished
    isWorking
    note
    userID
    username
    date
    metadata
    customKeys

Get Version Info

Retrieves the version information of a specified file ID.

URL: http://hostname:portnumber/nimAPI.php?q=getVersionInfo&ID=fileID

    Parameters              Type            Values                      Default        Required
________________________________________________________________________________________________

    ID                      integer                                                    YES
    username                string

RETURN:
    fileID
    fileClass
    parentID
    serverID
    task_type
    task_type_ID
    task_type_folder
    basename
    filename
    filepath
    ext
    version
    isPublished
    isWorking
    note
    userID
    username
    date
    metadata
    customKeys

Get Max Version

Retrieves the highest version number in a basename for a given fileID.

URL: http://hostname:portnumber/nimAPI.php?q=getMaxVersion

    Parameters              Type            Values                      Default        Required
________________________________________________________________________________________________

    fileID                  integer                                                    YES

RETURN:
    maxVersion

Clear Published Flags

Clears all published flags from basename

URL: http://hostname:portnumber/nimAPI.php?q=clearPubFlags

    Parameters              Description                                  Type            Values                      Default        Required
_____________________________________________________________________________________________________________________________________________

    class                   The parent class type                        string          show,shot,asset                            YES
    itemID                  The parent ID                                integer                                                    YES
    basename                The basename name                            string                                                     YES


Return:
    success

Add File

Saves a file to the NIM database

URL: http://hostname:portnumber/nimAPI.php?q=addFile

    Parameters              Description                                 Type            Values                          Default         Required
_________________________________________________________________________________________________________________________________________________

    class                   Class of parent for the file                string          show, shot, or asset                            YES
    itemID                  ID of the parent                            integer                                                         YES
    task_type_ID            Task type ID to associate with the file     integer                                                         YES
    task_type_folder        Task folder to use for the file             string                                                          YES
    userID                  ID of the user who owns the file            integer                                                         YES
    basename                Basename for the file                       string                                                          YES
    filename                File name of the file being saved           string                                                          YES
    path                    Path to the file                            string                                                          YES
    serverID                ID of the server where file exists          integer                                                         YES
    ext                     File extension                              string
    version                 Version of the file                         integer
    note                    Note to add to the file entry               string
    isPub                   Value of True will publish the file         boolean         True/False                      False
    isWork                  Mark file as a working file                 boolean         True/False                      True
    customKeys              Dictionary of custom keys                   dictionary      {"Custom Key Name" : "Value"}
    metadata                Dictionary of metadata (Internal Use)       dictionary      {"Key" : "Value"}

Example:
    .../nimAPI.php?q=addFile&class=asset&itemID=1&customKeys={"My Custom Key Name":"Some text"}

Return:
    Array in the format {success, error, ID} where the ID is the NIM ID of the newly created file.

Update File

Updates an existing file in the NIM database

URL: http://hostname:portnumber/nimAPI.php?q=updateFile

    Parameters              Description                                 Type            Values                          Default         Required
_________________________________________________________________________________________________________________________________________________

    ID                      ID of the file to update                    integer                                                         YES
    task_type_ID            Task type ID to associate with the file     integer
    task_type_folder        Task folder to use for the file             string
    userID                  ID of the user who owns the file            integer
    basename                Basename for the file                       string
    filename                File name of the file being saved           string
    filepath                Path to the file                            string
    ext                     File extension                              string
    version                 Version of the file                         integer
    note                    Comment to add to the file entry            string
    serverID                ID of the server where file exists          integer
    isPub                   Value of True will publish the file         boolean         True/False                      False
    isWork                  Mark file as a working file                 boolean         True/False                      True
    customKeys              Dictionary of custom keys                   dictionary      {"Custom Key Name" : "Value"}
    metadata                Dictionary of metadata (Internal Use)       dictionary      {"Key" : "Value"}

Example:
    .../nimAPI.php?q=updateFile&fileID=1&customKeys={"My Custom Key Name":"Some text"}

Return:
    Array in the format {success, error, ID} where the ID is the NIM ID of the newly created file.

Find Files

A search function for files.

Any provided parameters will filter the returned list.

URL: http://hostname:portnumber/nimAPI.php?q=findFiles

    Parameters              Description                                 Type            Values                          Default         Required
_________________________________________________________________________________________________________________________________________________

    name                    Find matching name                          string
    path                    Find matching path                          string
    parent                  Used with parentID to set the parent type   string          ASSET / SHOT
    parentID                Finds children of the parent item           integer
    metadata                Find matching metadata (Internal)           dictionary      {"Key" : "Value"}

Return:
    ID
    class
    parentID
    serverID
    task_type
    task_type_ID
    task_type_folder
    basename
    filename
    filepath
    ext
    version
    isPublished
    isWorking
    note
    userID
    username
    date
    metadata
    customKeys

Elements

Get Element Types

Returns the full list of element types.

URL: http://hostname:portnumber/nimAPI.php?q=getElementTypes

RETURN:
    ID
    name

Get Element Type

Returns the element type name from the ID.

URL: http://hostname:portnumber/nimAPI.php?q=getElementType

    Parameters              Description                                 Type            Values                          Default         Required
_________________________________________________________________________________________________________________________________________________

    ID                      Element ID                                  integer                                                         YES

RETURN:
    name

Find Elements

A more robust search function for elements.

All parameters are optional.

Any provided parameters will filter the returned list.

URL: http://hostname:portnumber/nimAPI.php?q=findElements


    Parameters              Description                                 Type            Values                          Default         Required
_________________________________________________________________________________________________________________________________________________

    name                    Element name                                string
    path                    Element path                                string
    jobID                   Job ID                                      integer
    showID                  Show ID                                     integer
    shotID                  Shot ID                                     integer
    assetID                 Asset ID                                    integer
    taskID                  Task ID                                     integer
    renderID                Render ID                                   integer
    elementTypeID           Element type ID                             integer
    ext                     File extension                              string
    metadata                Find matching metadata (Internal)           dictionary      {"Key" : "Value"}

RETURN:
    JSON Array

Get Elements

Retrieves a dictionary of elements for a particular type given parentID.

If no elementTypeID is given will return elements for all types.

URL: http://hostname:portnumber/nimAPI.php?q=getElements

    Parameters              Description                                 Type            Values                          Default         Required
_________________________________________________________________________________________________________________________________________________

    parent                  Parent of the element                       string          shot, asset, task, or render    shot            YES
    parentID                ID of the parent object                     integer                                                         YES
    elementTypeID           ID of the element type                      integer
    getLastElement          Return on the last published element        boolean         True/False                      False
    isPublished             Return only the published elements          boolean         True/False                      False

RETURN:
    ID
    jobID
    assetID
    shotID
    renderID
    elementTypeID
    elementType
    name
    path
    full_path
    isPublished

Add Element

Adds an element to an asset, shot, task, or render

URL: http://hostname:portnumber/nimAPI.php?q=addElement

    Parameters              Description                                 Type            Values                          Default         Required
_________________________________________________________________________________________________________________________________________________

    parent                  Parent of the element                       string          shot, asset, task, or render    shot            YES
    parentID                ID of the parent object                     integer                                                         YES
    typeID                  Element Type ID                             integer                                                         YES
    path                    Path to the file                            string                                                          YES
    name                    Name of the file                            string                                                          YES
    startFrame              If a sequence, this is the start frame      integer
    endFrame                If a sequence, this is the end frame        integer
    handles                 If a sequence, this is the handle length    integer
    isPublished             Should element be flagged as published      boolean         True/False                      False
    metadata                Find matching metadata (Internal)           dictionary      {"Key" : "Value"}

RETURN:
    success
    error

Update Element

Updates an existing element by element ID

URL: http://hostname:portnumber/nimAPI.php?q=updateElement

    Parameters              Description                                 Type            Values                          Default         Required
_________________________________________________________________________________________________________________________________________________

    ID                      Element ID                                  integer                                                         YES
    userID                  User ID                                     integer
    jobID                   Job ID                                      integer
    assetID                 Asset ID                                    integer
    shotID                  Shot ID                                     integer
    taskID                  Task ID                                     integer
    renderID                Render ID                                   integer
    elementTypeID           Element Type ID                             integer
    name                    Name of the file                            string
    path                    Path to the file                            string
    startFrame              If a sequence, this is the start frame      integer
    endFrame                If a sequence, this is the end frame        integer
    handles                 If a sequence, this is the handle length    integer
    isPublished             Should element be flagged as published      boolean         True/False                      False
    metadata                Find matching metadata (Internal)           dictionary      {"Key" : "Value"}

RETURN:
    JSON Array

Delete Element

Deletes an existing element by element ID

URL: http://hostname:portnumber/nimAPI.php?q=deleteElement

    Parameters              Description                                 Type            Values                          Default         Required
_________________________________________________________________________________________________________________________________________________

    ID                      Element ID                                  integer                                                         YES

Return:
    JSON Array

Render

Add Render:

Logs a render to a given taskID.

URL: http://hostname:portnumber/nimAPI.php?q=addRender

    Parameters              Description                                     Type            Values                          Default         Required
______________________________________________________________________________________________________________________________________________________

    taskID                  ID of the task to log the render                integer                                                         YES
    jobID                   ID of job to log the render                     integer
    class                   Is this an asset or shot render                 string          asset, shot                     shot
    fileID                  ID of a file to associate with render           integer
    renderKey               Unique Key for render to link to external       string
                            database / render management software

    renderName              Name of the render                              string
    renderType              Type of render                                  string
                            (example: Deadline will pass "mayaPlugin", "nukePlugin", etc...)

    renderComment           Comment to add to the render                    string
    outputDirs              Array out output directories from the render    JSON array
    outputFiles             Array of output files from the render           JSON array
    elementTypeID           ID of the element type to use for the render    integer
    start_datetime          Datetime value for the start of the render      datetime
    end_datetime            Datetime value for the end of the render        datetime
    avgTime                 Average time of the render                      string
    totalTime               Total time of the render                        string
    iconPath                Path to the render icon                         string
    frames                  The total frame count of the render             integer

RETURN:
    success
    error

Upload Render Icon:

Uploads an icon for a render

URL: http://hostname:portnumber/nimAPI.php?q=uploadRenderIcon

TYPE: POST

2 required fields:
        renderID or renderKey
        $_FILE[]

$_FILE[] needs to include a image binary file in the $_FILES directive

    Parameters              Description                                     Type            Values              Default         Required
_______________________________________________________________________________________________________________________________________________________________

    renderID                ID of the render to add the icon                integer                                             YES if renderKey is not passed
    renderKey               RenderKey of the render to add the icon         string                                              YES if renderID is not passed



RETURN:
    success - true or false
    error - will contain any generated error messages

Get Last Shot Render:

Retrieves the latest render for a shot

URL: http://hostname:portnumber/nimAPI.php?q=getLastShotRender

    Parameters              Description                                     Type            Values              Default         Required
_______________________________________________________________________________________________________________________________________________________________

    ID                      ID of the shot to retrieve last render          integer                                             YES


RETURN:
    ID
    jobID
    class
    taskID
    fileID
    userID
    renderKey
    deadlineID
    renderName
    renderType
    comment
    date
    outputDirs
    outputFiles
    frames
    start_datetime
    end_datetime
    avgTime
    totalTime
    iconPath

Review

Get Review Item Types

Retrieves the ID and name for all possible review items types

URL: http://hostname:portnumber/nimAPI.php?q=getReviewItemTypes

RETURN:
    JSON Array of review item types:

        ID - The ID of the review item type
        name - The name of the review item type

Get Task Review Items

Retrieves review items for the specified taskID

URL: http://hostname:portnumber/nimAPI.php?q=getTaskReviewItems

    Parameters              Description                                     Type            Values              Default         Required
_______________________________________________________________________________________________________________________________________________________________

    taskID                ID of the task to retrieve dailies                integer                                             YES

RETURN:
    JSON Array of dailies items:

        ID - The ID of the daily
        name - The name of the daily
        filepath - The filepath to the movie
        iconPath - The path to the dailies icon relative to the NIM URL
        dailiesMP4 -The path of the source mp4 relative to the NIM URL
        submitted - The submitted for review status - 0 not submitted / 1 submitted
        renderID - The ID of the associated render
        renderName - The name of the associated render
        frames - The total number of frames in the render
        avgTime - The average frame time for the render
        totalTime - The total time of the render
        renderDate - The date of the render
        renderIconPath - The path to the render icon relative to the NIM URL
        comment - The text of the render comment

Upload Review Item

Uploads a review item to a given context

URL: http://hostname:portnumber/nimAPI.php?q=uploadReviewItem

TYPE: POST

Only 2 required fields:
        itemID, itemType
        $_FILE[] needs to include a mov file in the $_FILES directive

    Parameters              Description                                     Type            Values                                  Default         Required
_______________________________________________________________________________________________________________________________________________________________

    itemID                  ID of the parent item                           integer                                                                 YES
    itemType                The type of parent item                         string          user, job, show, shot, task, render                     YES
    name                    The name of the review item                     string
    description             The description of the review item              string
    reviewItemTypeID        The ID for the reviewItemType                   integer
    reviewItemStatusID      The ID for the reviewItemStatus                 integer
    keywords                An array of keywords to associate               array string    Format: ["keyword1","keyword2"]

Return:
    success - true or false
    error - will contain any generated error messages

Upload Review Note

Uploads a note to an existing daily in NIM along with an associated image

The $_FILES directive must contain the file for upload

URL: http://hostname:portnumber/nimAPI.php?q=uploadReviewNote

    Parameters              Description                                     Type            Values      Default         Required
_______________________________________________________________________________________________________________________________________________________________

    dailiesID               ID of the daily to add note                     integer                                     YES
    name                    Name of the note                                string
    note                    Text of the note                                string
    frame                   Frame number to associate note                  integer
    time                    Time in the movie to associate note.            string
                            If this is not frame specific, -1 can be used.
    userID                  NIM user ID of the note owner                   integer                                     YES

RETURN:
    success - true or false
    error - will contain any generated error messages

Get Review Items

Returns the child review items and details for the given parent item

URL: http://hostname:portnumber/nimAPI.php?q=getReviewItems

    Parameters              Description                                     Type            Values      Default         Required
_______________________________________________________________________________________________________________________________________________________________

    ID                      ID of the review item                           integer                                     YES
    parentType                                                              string          user                        YES
                                                                                            job
                                                                                            dev
                                                                                            asset
                                                                                            show
                                                                                            shot
                                                                                            task
                                                                                            render
    parentID                 ID of the parent; jobID if value is "dev"      integer                                     YES


    allChildren              0 or 1, determines if we return review items associated with child items or not;
                             for example, if parent is show, would return review items on the show as well as
                             children shots, tasks, and renders
    name                     Filters the returned review items by the given name
    description              Filters the returned review items to items that contain the given string
    date                     Filters the returned review items by the given date in the format: yyyy-mm-dd
    typeID OR type           Filters the returned review items by the given typeID OR type name
    statusID OR status       Filters the returned review items by the given statusID OR status name
    keywordID OR keyword     Filters the returned review items by the given keywordID OR keyword name

Example:
    .../nimAPI.php?q=getReviewItems&parentType=asset&parentID=1

RETURN:
    success - true or false
    data - an associative array review item details:
            ID - The ID of the review item
            renderKey - an associated render key if applicable
            name - the name of the review item
            description - the description for the review item
            reviewItemTypeID - the associated review item type ID
            reviewItemGroupID - the group ID for review items belonging to a set of versions
            reviewItemStatusID - the associated review item status ID
            iconPath - the path to the poster icon
            mp4 - the path to the mp4 media if one exists
            ogv - the path to the ogv media if one exists
            webm - the path to the webm media if one exists
            filmstrip - the path to the filmstrip image if one exists
            width - width of the media
            height - height of the media
            duration - the duration of the media if applicable
            frames - the frames of the media if applicable
            frame_rate - the frame rate of the media if applicable
            date - the creation date
            creatorUserID - the creators user ID
            creatorFullName - the creators full name
            itemType - the type of parent this review item is associated with (user, job, dev, asset, show, shot, task)
            itemID - the ID of the parent item
            mediaType - the type of media (image, pdf, video)
            mediaPath - the path to the uploaded media

    error - will contain any generated error messages

Get Review Item Details

Returns the details for the given review item ID

URL: http://hostname:portnumber/nimAPI.php?q=getReviewItem

    Parameters              Description                                     Type            Values      Default         Required
_______________________________________________________________________________________________________________________________________________________________

    ID                      ID of the review item                           integer                                     YES

RETURN:
    success - true or false
    data - an associative array review item details:
            ID - The ID of the review item
            renderKey - an associated render key if applicable
            name - the name of the review item
            description - the description for the review item
            reviewItemTypeID - the associated review item type ID
            reviewItemGroupID - the group ID for review items belonging to a set of versions
            reviewItemStatusID - the associated review item status ID
            iconPath - the path to the poster icon
            mp4 - the path to the mp4 media if one exists
            ogv - the path to the ogv media if one exists
            webm - the path to the webm media if one exists
            filmstrip - the path to the filmstrip image if one exists
            width - width of the media
            height - height of the media
            duration - the duration of the media if applicable
            frames - the frames of the media if applicable
            frame_rate - the frame rate of the media if applicable
            date - the creation date
            creatorUserID - the creators user ID
            creatorFullName - the creators full name
            itemType - the type of parent this review item is associated with (user, job, dev, asset, show, shot, task)
            itemID - the ID of the parent item
            mediaType - the type of media (image, pdf, video)
            mediaPath - the path to the uploaded media

    error - will contain any generated error messages

Get Review Item Notes

Returns the all notes for a given review item ID

URL: http://hostname:portnumber/nimAPI.php?q=getReviewNotes

    Parameters              Description                                     Type            Values      Default         Required
_______________________________________________________________________________________________________________________________________________________________

    ID                      ID of the review item                           integer                                     YES

RETURN:
    success - true or false
    data - an array of objects containing all associated note data
    error - will contain any generated error messages

Get Review Item Statuses

Retrieves available review item statuses.

URL: http://hostname:portnumber/nimAPI.php?q=getReviewStatuses

Return:
    Object
        success - true or false
        error - any associated error message
        data - an array of review statuses
                - ID
                - name
                - priority
                - bgcolor
                - textcolor

Get Review Bins

GET /nimAPI.php?q=getReviewBins

Returns all review bins and their items within a specific context.

PARAMETERS

context

string

REQUIRED

The context of the review for which you want to retrieve bins. Valid options are user, job, dev, asset, show, and shot.

user sets the context to the user dashboard review. When API Keys are required, contextID must be the same as the API user’s userID, and the user must have the viewDashboardReview permission unless they are a root user.

When the dev context is used, set the contextID to the corresponding job ID.

contextID

integer

REQUIRED

The ID of the context item.

limit

integer

OPTIONAL

default: 0

Maximum rows to return. A value of 0 means no limit.

offset

integer

OPTIONAL

default: 0

Number of rows to skip before returning.

RETURN

success

boolean

Indicates whether the operation was successful.

Possible values: true or false.

error

string

Contains any generated error messages if success is false.

If success is true, this field is typically an empty string.

total_count

integer

The total number of rows that match the search criteria.

data

array

An array of objects, each representing a review bin. Every bin object includes:

  • ID : The unique identifier of the bin

  • name : The name of the bin

  • creationDate : Timestamp when the bin was created

  • createdByUserID : ID of the user who created the bin

  • createdByFullName : Full name of the user who created the bin

  • modifiedDate : Timestamp of the bin’s most recent update

  • modifiedByUserID : ID of the user who most recently updated the bin

  • modifiedByFullName : Full name of the user who most recently updated the bin

  • autoUpdateVersions : A flag indicating if version updates happen automatically. 1 for true, 0 for false.

  • reviewItems : An array of review items within the bin. Each item contains:

    • ID : Unique item identifier

    • name : Name or label for the review item

    • creationDate : Timestamp when the review item was created

    • createdByUserID : ID of the user who created the item

    • createdByFullName : Name of the user who created the item

    • position : The item’s position in the bin

Example Request:

curl "http://hostname:portnumber/nimAPI.php?q=getReviewBins&context=job&contextID=1"

Example Response:

{
    "success": true,
    "error": "",
    "total_count": 1,
    "data": [
        {
            "ID": 10,
            "name": "Test Bin",
            "creationDate": "2025-02-03 12:00:00",
            "createdByUserID": 2,
            "createdByFullName": "John Doe",
            "modifiedDate": "2025-02-04 15:30:00",
            "modifiedByUserID": 3,
            "modifiedByFullName": "Jane Smith",
            "autoUpdateVersions": 0,
            "reviewItems": [
                {
                    "ID": 100,
                    "name": "First Review Item",
                    "creationDate": "2025-02-03 12:30:00",
                    "createdByUserID": 2,
                    "createdByFullName": "John Doe",
                    "position": 1
                }
            ]
        }
    ]
}

Add Review Bin

GET /nimAPI.php?q=addReviewBin

Creates a new review bin for a specific context and returns the ID of the newly created bin.

PARAMETERS

context

string

REQUIRED

The context in which to create a new review bin. Valid options are user, job, dev, asset, show, and shot.

user sets the context to the user dashboard review. When API Keys are required, contextID must be the same as the API user’s userID, and the user must have the viewDashboardReview permission unless they are a root user.

When the dev context is used, set the contextID to the corresponding job ID.

contextID

integer

REQUIRED

The ID of the context item.

name

string

REQUIRED

The name of the review bin.

autoUpdateVersions

integer

OPTIONAL

default: 0

Flag to automatically update versions in the bin when new versions are added.

1 = Automatically update versions

0 = Do not update versions

RETURN

success

boolean

Indicates whether the operation was successful.

Possible values: true or false.

error

string

Contains any generated error messages if success is false.

If success is true, this field is typically an empty string.

data

object

An object including the ID of the new bin. The object includes:

  • ID : The unique identifier of the new bin

Example Request:

curl "http://hostname:portnumber/nimAPI.php?q=addReviewBin&context=job&contextID=1&name=Test Bin"

Example Response:

{
    "success": true,
    "error": "",
    "data": {
        "ID": 10
    }
}

Update Review Bin

GET /nimAPI.php?q=updateReviewBin

Updates an existing review bin.

PARAMETERS

ID

integer

REQUIRED

The ID of the review bin to update.

name

string

OPTIONAL

The new name of the review bin.

autoUpdateVersions

integer

OPTIONAL

Flag to automatically update versions in the bin when new versions are added.

1 = Automatically update versions

0 = Do not update versions

RETURN

success

boolean

Indicates whether the operation was successful.

Possible values: true or false.

error

string

Contains any generated error messages if success is false.

If success is true, this field is typically an empty string.

Example Request:

curl "http://hostname:portnumber/nimAPI.php?q=updateReviewBin&ID=1&name=Test Bin&autoUpdateVersions=1"

Example Response:

{
    "success": true,
    "error": ""
}

Delete Review Bin

GET /nimAPI.php?q=deleteReviewBin

Deletes an existing review bin.

PARAMETERS

ID

integer

REQUIRED

The ID of the review bin to delete.

RETURN

success

boolean

Indicates whether the operation was successful.

Possible values: true or false.

error

string

Contains any generated error messages if success is false.

If success is true, this field is typically an empty string.

Example Request:

curl "http://hostname:portnumber/nimAPI.php?q=deleteReviewBin&ID=1"

Example Response:

{
    "success": true,
    "error": ""
}

Add Review Bin Item

GET /nimAPI.php?q=addReviewBinItem

Adds an existing review item to a review bin.

PARAMETERS

binID

integer

REQUIRED

The ID of the review bin to update.

itemID

integer

REQUIRED

The ID of the review item to add to the bin.

The review item must be associated with the same context as the review bin.

position

integer

OPTIONAL

The position to place the review item in the bin.

Valid values are 1 or greater.

If the position is greater than the number of review items in the bin, the review item is placed at the end of the bin.

If not provided, the review item is added to the end of the bin.

RETURN

success

boolean

Indicates whether the operation was successful.

Possible values: true or false.

error

string

Contains any generated error messages if success is false.

If success is true, this field is typically an empty string

Example Request:

curl "http://hostname:portnumber/nimAPI.php?q=addReviewBinItem&binID=1&itemID=1&position=1"

Example Response:

{
    "success": true,
    "error": ""
}

Position Review Bin Item

GET /nimAPI.php?q=positionReviewBinItem

Moves a review item to a new position in a review bin.

PARAMETERS

binID

integer

REQUIRED

The ID of the review bin to update.

itemID

integer

REQUIRED

The ID of the review item to move.

position

integer

REQUIRED

The position to place the review item in the bin.

Valid values are 1 or greater.

If the position is greater than the number of review items in the bin, the review item is placed at the end of the bin.

RETURN

success

boolean

Indicates whether the operation was successful.

Possible values: true or false.

error

string

Contains any generated error messages if success is false.

If success is true, this field is typically an empty string.

Example Request:

curl "http://hostname:portnumber/nimAPI.php?q=positionReviewBinItem&binID=1&itemID=1&position=2"

Example Response:

{
    "success": true,
    "error": ""
}

Remove Review Bin Item

GET /nimAPI.php?q=removeReviewBinItem

Removes a review item from a review bin. This does not delete the review item. The item is simply removed from the bin.

PARAMETERS

binID

integer

REQUIRED

The ID of the review bin containing the review item.

itemID

integer

REQUIRED

The ID of the review item to remove.

RETURN

success

boolean

Indicates whether the operation was successful.

Possible values: true or false.

error

string

Contains any generated error messages if success is false.

If success is true, this field is typically an empty string.

Example Request:

curl "http://hostname:portnumber/nimAPI.php?q=removeReviewBinItem&binID=1&itemID=1"

Example Response:

{
    "success": true,
    "error": ""
}

Timecards

Get Timecards

Retrieves a timecard, or array of timecards based on search criteria

A user can be passed by either username or userID. If both are passed the userID will be used. A taskType can be passed by either the name using taskType or ID with taskTypeID. If both are passed the taskTypeID will be used. A location can be passed by either the name using location or ID with locationID. If both are passed the locationID will be used.

URL: http://hostname:portnumber/nimAPI.php?q=getTimecards

    Parameters              Type            Values                      Default        Required
________________________________________________________________________________________________

    startDate           date                format: 2017-11-30                         not required if jobID provided
    endDate             date                format: 2017-11-30                         not required if jobID provided
    jobID               integer                                                        ---
    userID              integer
    username            string
    taskTypeID          integer
    taskType            string
    taskID              integer
    locationID          integer
    location            string

Return:
    JSON Array

Add Timecards

Adds a new timecard

A user can be passed by either username or userID. If both are passed the userID will be used. A taskType can be passed by either the name using taskType or ID with taskTypeID. If both are passed the taskTypeID will be used. A location can be passed by either the name using location or ID with locationID. If both are passed the locationID will be used.

If a taskID is passed, the tasks values will override userID, jobID, and taskTypeID

URL: http://hostname:portnumber/nimAPI.php?q=addTimecard

    Parameters              Type            Values                      Default        Required
________________________________________________________________________________________________

    date                    date            format: 2017-11-30                         YES
    userID                  integer
    username                string
    jobID                   integer
    taskTypeID              integer
    taskType                string
    taskID                  integer
    startTime               string          range: 00:00:00 to 23:59:59
    endTime                 string          range: 00:00:00 to 23:59:59
    hrs                     decimal         hours between start_time and end_time, including break_hrs, ot, and dt; max 24
    breakHrs                decimal         must fit within hrs
    ot                      decimal         must fit within hrs - break_hrs
    dt                      decimal         must fit within hrs - (break_hrs + ot)
    locationID              integer
    location                string
    description             string
    customKeys              dictionary      {"Custom Key Name" : "Value"}

Return:
    dictionary

Update Timecard

Updates an existing timecard

A user can be passed by either username or userID. If both are passed the userID will be used. A taskType can be passed by either the name using taskType or ID with taskTypeID. If both are passed the taskTypeID will be used. A location can be passed by either the name using location or ID with locationID. If both are passed the locationID will be used.

If a taskID is passed, the tasks values will override userID, jobID, and task_types_ID

URL: http://hostname:portnumber/nimAPI.php?q=updateTimecard

    Parameters              Type            Values                      Default        Required
________________________________________________________________________________________________

    timecardID              integer                                                     YES
    date                    date            format: 2017-11-30
    userID                  integer
    username                string
    jobID                   integer
    taskTypeID              integer
    taskType                string
    taskID                  integer
    startTime               string          range: 00:00:00 to 23:59:59
    endTime                 string          range: 00:00:00 to 23:59:59
    hrs                     decimal         hours between start_time and end_time, including break_hrs, ot, and dt; max 24
    breakHrs                decimal         must fit within hrs
    ot                      decimal         must fit within hrs - break_hrs
    dt                      decimal         must fit within hrs - (break_hrs + ot)
    locationID              integer
    location                string
    description             string
    customKeys              dictionary      {"Custom Key Name" : "Value"}

Return:
    dictionary

Delete Timecard

Deletes an existing timecard

URL: http://hostname:portnumber/nimAPI.php?q=deleteTimecard

    Parameters              Type            Values                      Default        Required
________________________________________________________________________________________________

    timecardID          integer                                                         YES

Return:
    dictionary

Get Timecard Info

Retrieves information for an existing timecard

URL: http://hostname:portnumber/nimAPI.php?q=getTimecardInfo

    Parameters              Type            Values                      Default        Required
________________________________________________________________________________________________

    timecardID          integer                                                         YES

Return:
    dictionary