HTTP¶
The HTTP API can be used to read information from the NIM, create new items, update existing items, and delete items. All request responses are received in the form of JavaScript Object Notation (JSON) formatted objects.
HTTP requests are prefixed with the URL to the NIM API and appended with the API request and its parameters.
NIM API URL:
http://hostname:portnumber/nimAPI.php
API Example¶
The following request will return the basic job information for the given job ID:
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=getJobInfo&ID=1"
Example Response:
[ { "ID":1, "number":"00000", "jobname":"ADMIN", "folder":"0_ADMIN" } ]The next example shows how to pass custom keys to update a job:
Example Request:
curl '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:
HTTP Headers¶ X-NIM-API-USER
The user’s NIM username
X-NIM-API-KEY
The user’s NIM 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.
Important
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¶
GET
/nimAPI.php?q=testAPI
¶Used to test connectivity to the NIM API. Returns the current NIM version, API key validity, and whether API keys are required.
RETURN¶ version
string
The current NIM version.
keyValid
boolean
Indicates if the API key is valid. Possible values: true or false.
keyRequired
boolean
Indicates if API keys are required. Possible values: true or false.
error
string
Contains any error messages if keyValid is false.
If keyValid is true, this field is typically an empty string.
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=testAPI"
Example Response:
{ "version": "7.2.0.250224", "keyValid": "false", "keyRequired": "false", "error": "" }
Get Culture Codes¶
GET
/nimAPI.php?q=getCultureCodes
¶Retrieves a list of currency codes used for setting the currency type of an item.
RETURN¶ success
boolean
Indicates whether the operation was successful.
Possible values: true or false.
error
string
Contains any error messages if success is false.
If success is true, this field is typically an empty string.
rows
array
An array of objects, each representing a culture code. Each object includes:
cultureCode : The culture code (e.g., “en-US”)
currency : The name of the currency (e.g., “United States Dollar”)
currencyCode : The currency code (e.g., “USD”)
totalRows
integer
The total count of returned rows in the array.
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=getCultureCodes"
Example Response:
{ "success": true, "error": "", "rows": [ { "cultureCode": "en-US", "currency": "United States Dollar", "currencyCode": "USD" }, { "cultureCode": "en-IE", "currency": "Euro (Ireland)", "currencyCode": "EUR" } ], "totalRows": 44 }
Users¶
Get User ID¶
GET
/nimAPI.php?q=getUserID
¶Retrieves the user ID from username.
PARAMETERS¶ u
string
REQUIRED
The username to retrieve the ID.
RETURN¶ ID
integer
The user ID corresponding to the provided username.
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=getUserID&u=username"
Example Response:
[ { "ID": 1 } ]
Get User Full Name¶
GET
/nimAPI.php?q=getUserFullName
¶Retrieves the user’s full name from username.
PARAMETERS¶ u
string
REQUIRED
The username to retrieve the full name.
RETURN¶ first_name
string
The first name of the user.
last_name
string
The last name of the user.
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=getUserFullName&u=username"
Example Response:
[ { "first_name": "John", "last_name": "Doe" } ]
Get All Users¶
GET
/nimAPI.php?q=getUsers
¶Returns the full list of NIM Users.
RETURN¶ ID
integer
The unique identifier for the user.
username
string
The username of the user.
first_name
string
The first name of the user.
last_name
string
The last name of the user.
full_name
string
The full name of the user.
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=getUsers"
Example Response:
[ { "ID": 1, "username": "jdoe", "first_name": "John", "last_name": "Doe", "full_name": "John Doe" }, { "ID": 2, "username": "asmith", "first_name": "Alice", "last_name": "Smith", "full_name": "Alice Smith" } ]
Get User Info¶
GET
/nimAPI.php?q=getUserInfo
¶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.
PARAMETERS¶ ID
integer
OPTIONAL
The ID of the user to query.
username
string
OPTIONAL
The username of the user to query.
RETURN¶ ID
integer
The unique identifier for the user.
username
string
The username of the user.
first_name
string
The first name of the user.
last_name
string
The last name of the user.
full_name
string
The full name of the user.
string
The email address of the user.
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=getUserInfo&username=jdoe"
Example Response:
[ { "ID": 1, "username": "jdoe", "first_name": "John", "last_name": "Doe", "full_name": "John Doe", "email": "jdoe@example.com" } ]
Locations¶
Get All Locations¶
GET
/nimAPI.php?q=getLocations
¶Retrieves all defined locations.
RETURN¶ ID
integer
The unique identifier for the location.
name
string
The name of the location.
description
string
The description of the location.
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=getLocations"
Example Response:
[ { "ID": 1, "name": "Main Office", "description": "The main office location" }, { "ID": 2, "name": "Remote Office", "description": "The remote office location" } ]
Contacts¶
Get Contacts¶
GET
/nimAPI.php?q=getContacts
¶Get Contacts based on search parameters. The 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.
PARAMETERS¶ ID
integer
OPTIONAL
The ID of a contact item to query.
first_name
string
OPTIONAL
Will return all contact items matching the first name.
last_name
string
OPTIONAL
Will return all contact items matching the last name.
string
OPTIONAL
Will return all contact items matching the email.
title
string
OPTIONAL
Will return all contact items matching the title.
company
string
OPTIONAL
Will return all contact items matching the company name.
website
string
OPTIONAL
Will return all contact items matching the website.
work_phone
string
OPTIONAL
Will return all contact items matching the work phone number.
work_fax
string
OPTIONAL
Will return all contact items matching the work fax number.
mobile_phone
string
OPTIONAL
Will return all contact items matching the mobile phone number.
home_phone
string
OPTIONAL
Will return all contact items matching the home phone number.
address1
string
OPTIONAL
Will return all contact items matching the address1 field.
address2
string
OPTIONAL
Will return all contact items matching the address2 field.
city
string
OPTIONAL
Will return all contact items matching the city.
state
string
OPTIONAL
Will return all contact items matching the state.
zip
string
OPTIONAL
Will return all contact items matching the zip.
description
string
OPTIONAL
Will return all contact items partially matching the description.
groups
string
OPTIONAL
A comma separated list of group names.
Format “group1,group2”
Example:
.../nimAPI.php?q=getContacts&groups=Group1,Group2keywords
string
OPTIONAL
A comma separated list of keywords.
Format “keyword1,keyword2”
Example:
.../nimAPI.php?q=getContacts&keywords=Sales,MarketingcustomKeys
dictionary
OPTIONAL
A dictionary of custom keys.
Format: {“Custom Key Name” : “Value”}
Example:
.../nimAPI.php?q=getContacts&customKeys={"My Custom Key Name":"Some text","Another Custom Key":"Some other text"}limit
integer
OPTIONAL
default: 0
Specifies the maximum number of rows to return.
0 = no limit
offset
integer
OPTIONAL
default: 0
Specifies the number of rows to skip before starting to return rows.
RETURN¶ success
boolean
Indicates whether the operation was successful.
Possible values: true or false.
error
string
Contains any 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 object includes:
ID : The unique identifier for the contact
is_company : Indicates if the contact is a company (1) or an individual (0)
userID : The user ID associated with the contact
first_name : The first name of the contact
last_name : The last name of the contact
email : The email address of the contact
title : The title of the contact
company : The company name of the contact
website : The website of the contact
work_phone : The work phone number of the contact
work_fax : The work fax number of the contact
mobile_phone : The mobile phone number of the contact
home_phone : The home phone number of the contact
address1 : The first line of the contact’s address
address2 : The second line of the contact’s address
city : The city of the contact
state : The state of the contact
zip : The zip code of the contact
description : The description of the contact
contact_type : The type of contact
keywords : The keywords associated with the contact
groups : The groups associated with the contact
linked_contacts : An array of linked contacts, each containing:
ID : The unique identifier for the linked contact
is_company : Indicates if the linked contact is a company (1) or an individual (0)
first_name : The first name of the linked contact
last_name : The last name of the linked contact
company : The company name of the linked contact
email : The email address of the linked contact
customKeys : An array of custom keys, each containing:
keyID : The unique identifier for the custom key
keyName : The name of the custom key
typeID : The type ID of the custom key
value : The value of the custom key
dropdownText : The dropdown text of the custom key
linkText : The link text of the custom key
priority : The priority of the custom key
enabled : Indicates if the custom key is enabled (1) or disabled (0)
editable : Indicates if the custom key is editable (1) or not (0)
dropdownOptions : An array of dropdown options for the custom key, each containing:
ID : The unique identifier for the dropdown option
value : The value of the dropdown option
enabled : Indicates if the dropdown option is enabled (1) or disabled (0)
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=getContacts&first_name=John&last_name=Smith"
Example Response:
{ "success": true, "error": "", "total_count": 1, "data": [ { "ID": 1, "is_company": 1, "userID": 0, "first_name": "John", "last_name": "Smith", "email": "john.smith@example.com", "title": "Manager", "company": "Example Corp", "website": "www.example.com", "work_phone": "123-456-7890", "work_fax": "123-456-7891", "mobile_phone": "123-456-7892", "home_phone": "123-456-7893", "address1": "123 Main St", "address2": "Suite 100", "city": "Anytown", "state": "CA", "zip": "12345", "description": "A sample contact", "contact_type": "staff", "keywords": "API, Python", "groups": "API Test", "linked_contacts": [ { "ID": 2, "is_company": 0, "first_name": "Jane", "last_name": "Doe", "company": "Example Corp", "email": "jane.doe@example.com" }, { "ID": 3, "is_company": 1, "first_name": "", "last_name": null, "company": "Example Corp", "email": null } ], "customKeys": [ { "keyID": 1, "keyName": "Contact Single Line", "typeID": 1, "value": "Custom Text", "dropdownText": "", "linkText": "", "priority": 1, "enabled": 1, "editable": 1 }, { "keyID": 2, "keyName": "Contact Dropdown", "typeID": 3, "value": "", "dropdownText": "", "linkText": "", "priority": 1, "enabled": 1, "editable": 1, "dropdownOptions": [ { "ID": 1, "value": "1 Contact", "enabled": 1 }, { "ID": 2, "value": "2 Contact", "enabled": 1 }, { "ID": 3, "value": "3 Contact", "enabled": 1 } ] } ] } ] }
Add Contact¶
GET
/nimAPI.php?q=addContact
¶Creates a new contact in NIM.
PARAMETERS¶ is_company
boolean
OPTIONAL
default: 0
Indicates if the contact is a company.
0 = No
1 = Yes
first_name
string
OPTIONAL
The first name of the contact.
last_name
string
OPTIONAL
The last name of the contact.
string
OPTIONAL
The email of the contact.
title
string
OPTIONAL
The title of the contact.
company
string
OPTIONAL
The company name for the contact.
website
string
OPTIONAL
The website of the contact.
work_phone
string
OPTIONAL
The work phone number of the contact.
work_fax
string
OPTIONAL
The fax number of the contact.
mobile_phone
string
OPTIONAL
The mobile phone number of the contact.
home_phone
string
OPTIONAL
The home phone number of the contact.
address1
string
OPTIONAL
The first address line of the contact.
address2
string
OPTIONAL
The second address line of the contact.
city
string
OPTIONAL
The city for the contact.
state
string
OPTIONAL
The state for the contact.
zip
string
OPTIONAL
The zip code for the contact.
description
string
OPTIONAL
The description for the contact.
keywords
string
OPTIONAL
A comma separated list of keywords.
Format: [“keyword1”,”keyword2”]
Example:
.../nimAPI.php?q=addContact&keywords=["Sales","Marketing"]groups
string
OPTIONAL
A comma separated list of group names.
Format: [“group1”,”group2”]
Example:
.../nimAPI.php?q=addContact&groups=["Group1","Group2"]contact_link_IDs
string
OPTIONAL
A comma separated list of contact IDs.
Format: 1,2,3
Including this parameter will set all linked contacts for this contact.
customKeys
dictionary
OPTIONAL
A dictionary of custom keys.
Format: {“Custom Key Name” : “Value”}
Example:
.../nimAPI.php?q=addContact&customKeys={"My Custom Key Name":"Some text","Another Custom Key":"Some other text"}
RETURN¶ success
boolean
Indicates whether the operation was successful.
Possible values: true or false.
error
string
Contains any error messages if success is false.
If success is true, this field is typically an empty string.
ID
integer
The ID of the newly created item.
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=addContact&first_name=John&last_name=Smith"
Example Response:
{ "success": true, "error": "", "ID": 1234 }
Update A Contact¶
GET
/nimAPI.php?q=updateContact
¶Update an existing contact by ID.
Note
If an optional field is not passed, the value for that field will remain unchanged.
PARAMETERS¶ ID
integer
REQUIRED
The ID of the contact to update.
first_name
string
OPTIONAL
The first name of the contact.
last_name
string
OPTIONAL
The last name of the contact.
string
OPTIONAL
The email of the contact.
title
string
OPTIONAL
The title of the contact.
company
string
OPTIONAL
The company name for the contact.
website
string
OPTIONAL
The website of the contact.
work_phone
string
OPTIONAL
The work phone number of the contact.
work_fax
string
OPTIONAL
The fax number of the contact.
mobile_phone
string
OPTIONAL
The mobile phone number of the contact.
home_phone
string
OPTIONAL
The home phone number of the contact.
address1
string
OPTIONAL
The first address line of the contact.
address2
string
OPTIONAL
The second address line of the contact.
city
string
OPTIONAL
The city for the contact.
state
string
OPTIONAL
The state for the contact.
zip
string
OPTIONAL
The zip code for the contact.
description
string
OPTIONAL
The description for the contact.
keywords
string
OPTIONAL
A comma separated list of keywords.
Format: [“keyword1”,”keyword2”]
Example:
.../nimAPI.php?q=updateContact&ID=1&keywords=["Sales","Marketing"]groups
string
OPTIONAL
A comma separated list of group names.
Format: [“group1”,”group2”]
Example:
.../nimAPI.php?q=updateContact&ID=1&groups=["Group1","Group2"]contact_link_IDs
string
OPTIONAL
A comma separated list of contact IDs.
Format: 1,2,3
Including this parameter will replace all linked contacts for this contact.
customKeys
dictionary
OPTIONAL
A dictionary of custom keys.
Format: {“Custom Key Name” : “Value”}
Example:
.../nimAPI.php?q=updateContact&ID=1&first_name=Jill&last_name=Stevens&customKeys={"My Custom Key Name":"Some text"}
RETURN¶ success
boolean
Indicates whether the operation was successful.
Possible values: true or false.
error
string
Contains any error messages if success is false.
If success is true, this field is typically an empty string.
ID
integer
The ID of the updated item.
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=updateContact&ID=8963&first_name=Jill&last_name=Stevens"
Example Response:
{ "success": true, "error": "", "ID": 1234 }
Delete A Contact¶
GET
/nimAPI.php?q=deleteContact
¶Delete an existing contact by ID.
PARAMETERS¶ ID
integer
REQUIRED
The ID of the contact to delete.
RETURN¶ success
boolean
Indicates whether the operation was successful.
Possible values: true or false.
error
string
Contains any 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=deleteContact&ID=8978"
Example Response:
{ "success": true, "error": "" }
Schedule Events¶
Get Schedule Events¶
GET
/nimAPI.php?q=getScheduleEvents
¶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.
PARAMETERS¶ ID
integer
OPTIONAL
The ID of a schedule event to query.
title
string
OPTIONAL
Will return all schedule events matching the title.
description
string
OPTIONAL
Will return all schedule events partially matching the description.
statusName
string
OPTIONAL
Will return all schedule events matching the statusName.
locationName
string
OPTIONAL
Will return all schedule events matching the locationName.
jobName
string
OPTIONAL
Will return all schedule events matching the jobName.
jobNumber
string
OPTIONAL
Will return all schedule events matching the jobNumber.
userIDs
string
OPTIONAL
Will return all schedule events matching the userIDs.
Format: A comma separated list of IDs.
users
string
OPTIONAL
Will return all schedule events matching the users.
Format: A comma separated list of names.
resourceIDs
string
OPTIONAL
Will return all schedule events matching the resourceIDs
Format: A comma separated list of IDs.
resources
string
OPTIONAL
Will return all schedule events matching the resources.
Format: A comma separated list of names.
start
datetime
OPTIONAL
Will return all schedule events matching the start.
Format: yyyy-mm-ddThh:mm:ss.sssZ
or yyyy-mm-dd hh:mm:ss.sss timezone
end
datetime
OPTIONAL
Will return all schedule events matching the end.
Format: yyyy-mm-ddThh:mm:ss.sssZ
or yyyy-mm-dd hh:mm:ss.sss timezone
startRange
datetime
OPTIONAL
Will return all schedule events (and event recurrences) AFTER the startRange.
Format: yyyy-mm-ddThh:mm:ss.sssZ
or yyyy-mm-dd hh:mm:ss.sss timezone
endRange
datetime
OPTIONAL
Will return all schedule events (and event recurrences) BEFORE the endRange.
Format: yyyy-mm-ddThh:mm:ss.sssZ
or yyyy-mm-dd hh:mm:ss.sss timezone
startTimezone
string
OPTIONAL
Will return all schedule events matching the startTimezone.
endTimezone
string
OPTIONAL
Will return all schedule events matching the endTimezone.
isAllDay
boolean
OPTIONAL
Will return all schedule events matching the isAllDay setting.
0 = not an all-day event
1 = an all-day event
recurrenceId
integer
OPTIONAL
Will return all schedule events matching the recurrenceId.
recurrenceRule
string
OPTIONAL
Will return all schedule events matching the recurrenceRule.
recurrenceException
string
OPTIONAL
Will return all schedule events matching the recurrenceException.
userUtilizationTypeID
integer
OPTIONAL
Will return all schedule events matching the userUtilizationTypeID.
userUtilizationType
string
OPTIONAL
Will return all schedule events matching the userUtilizationType.
userUtilizationValue
string
OPTIONAL
Will return all schedule events matching the userUtilizationValue.
resourceUtilizationTypeID
integer
OPTIONAL
Will return all schedule events matching the resourceUtilizationTypeID.
resourceUtilizationType
string
OPTIONAL
Will return all schedule events matching the resourceUtilizationType.
resourceUtilizationValue
string
OPTIONAL
Will return all schedule events matching the resourceUtilizationValue.
limit
integer
OPTIONAL
default: 0
Specifies the maximum number of rows to return.
0 = no limit.
offset
integer
OPTIONAL
default: 0
Specifies the number of rows to skip before starting to return rows.
RETURN¶ success
boolean
Indicates whether the operation was successful.
Possible values: true or false.
error
string
Contains any 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 object includes:
ID : The unique identifier for the schedule event
title : The title of the schedule event
start : The start datetime of the schedule event
end : The end datetime of the schedule event
startTimezone : The start timezone of the schedule event
endTimezone : The end timezone of the schedule event
description : The description of the schedule event
recurrenceId : The recurrence ID of the schedule event
recurrenceRule : The recurrence rule of the schedule event
recurrenceException : The recurrence exception of the schedule event
isAllDay : Indicates if the schedule event is an all-day event (1) or not (0)
status : An object containing the status ID and name of the schedule event
location : An object containing the location ID and name of the schedule event
job : An object containing the job ID, number, and name associated with the schedule event
users : An array of objects, each containing the user ID and name associated with the schedule event
resources : An array of objects, each containing the resource ID and name associated with the schedule event
userUtilization : An object containing the user utilization type ID, type, and value associated with the schedule event
resourceUtilization : An object containing the resource utilization type ID, type, and value associated with the schedule event
startUtc : The start datetime of the schedule event in UTC
endUtc : The end datetime of the schedule event in UTC
recurrences : An array of objects, each containing the start and end datetimes of the recurrences of the schedule event
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=getScheduleEvents&title=MyEvent"
Example Response:
{ "success": true, "error": "", "total_count": 12, "data": [ { "ID": 3394, "title": "MyEvent", "start": "2024-07-08", "end": "2024-07-12", "startTimezone": "America/Los_Angeles", "endTimezone": "America/Los_Angeles", "description": "Event description", "recurrenceId": "", "recurrenceRule": "FREQ=WEEKLY;COUNT=3;BYDAY=MO;WKST=SU;", "recurrenceException": "20240722T070000Z", "isAllDay": "true", "status": { "ID": 6, "name": "2nd Hold" }, "location": { "ID": 3, "name": "London" }, "job": { "ID": 5025, "number": "24013", "name": "Example Job" }, "users": [ { "ID": "309", "name": "John Doe" }, { "ID": "75", "name": "Jane Smith" } ], "resources": [], "userUtilization": { "typeID": 1, "type": "hours per day", "value": "8.00" }, "resourceUtilization": { "typeID": 1, "type": "units per day", "value": "1.00" }, "startUtc": "2024-07-08T00:00:00Z", "endUtc": "2024-07-12T00:00:00Z", "recurrences": [ { "start": "2024-07-08", "end": "2024-07-12", "startUtc": "2024-07-08T00:00:00Z", "endUtc": "2024-07-12T00:00:00Z" }, { "start": "2024-07-15", "end": "2024-07-19", "startUtc": "2024-07-15T00:00:00Z", "endUtc": "2024-07-19T00:00:00Z" }, { "start": "2024-07-22", "end": "2024-07-26", "startUtc": "2024-07-22T00:00:00Z", "endUtc": "2024-07-26T00:00:00Z" } ] } ] }
Add Schedule Event¶
GET
/nimAPI.php?q=addScheduleEvent
¶Creates a new event on the schedule.
PARAMETERS¶ start
datetime
REQUIRED
The start datetime of the event.
Date if isAllDay = 1; datetime otherwise.
Format: yyyy-mm-ddThh:mm:ss.sssZ
or yyyy-mm-dd hh:mm:ss.sss timezone
end
datetime
REQUIRED
The end datetime of the event.
Date if isAllDay = 1; datetime otherwise.
Format: yyyy-mm-ddThh:mm:ss.sssZ
or yyyy-mm-dd hh:mm:ss.sss timezone
jobID
integer
OPTIONAL
A job ID to associate with the event.
Required if userIDs and resourceIDs are not provided.
userIDs
string
OPTIONAL
A comma-separated list of user IDs.
Required if jobID and resourceIDs are not provided.
resourceIDs
string
OPTIONAL
A comma-separated list of resource IDs.
Required if jobID and userIDs are not provided.
title
string
OPTIONAL
The title of the event.
description
string
OPTIONAL
The description of the event.
statusID
integer
OPTIONAL
The ID of the status to associate with the event.
statusName
string
OPTIONAL
The name of the status to associate with the event.
locationID
integer
OPTIONAL
The ID of the location to associate with the event.
startTimezone
string
OPTIONAL
A valid timezone identifier.
Example: America/Los_Angeles
endTimezone
string
OPTIONAL
A valid timezone identifier.
Example: America/Los_Angeles
isAllDay
boolean
OPTIONAL
Indicates if the event is an all-day event.
Possible values: 0 or 1.
recurrenceId
integer
OPTIONAL
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
OPTIONAL
Recurring event ruleset string.
For more information on rulesets, see https://datatracker.ietf.org/doc/html/rfc5545.
recurrenceException
string
OPTIONAL
A list of comma-separated start datetimes for all exceptions to this recurring event’s rules.
userUtilizationTypeID
integer
OPTIONAL
The ID of the user utilization type to associate with the event.
userUtilizationType
string
OPTIONAL
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
OPTIONAL
The value of the user utilization type to associate with the event.
resourceUtilizationTypeID
integer
OPTIONAL
The ID of the resource utilization type to associate with the event.
resourceUtilizationType
string
OPTIONAL
The name of the resource utilization type to associate with the event.
Possible values are: units per day or percent per day.
resourceUtilizationValue
string
OPTIONAL
The value of the resource utilization type to associate with the event.
RETURN¶ success
boolean
Indicates whether the operation was successful.
Possible values: true or false.
error
string
Contains any error messages if success is false.
If success is true, this field is typically an empty string.
ID
integer
The ID of the newly created item.
Example Request:
curl "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"
Example Response:
{ "success": true, "error": "", "ID": 1234 }
Update Schedule Event¶
GET
/nimAPI.php?q=updateScheduleEvent
¶Updates an existing schedule event by ID.
PARAMETERS¶ ID
integer
REQUIRED
The ID of the schedule event to update.
title
string
OPTIONAL
The title of the event.
description
string
OPTIONAL
The description of the event.
statusID
integer
OPTIONAL
The ID of the status to associate with the event.
statusName
string
OPTIONAL
The name of the status to associate with the event.
locationID
integer
OPTIONAL
The ID of the location to associate with the event.
jobID
integer
OPTIONAL
The ID of the job to associate with the event.
userIDs
string
OPTIONAL
A comma-separated list of user IDs.
resourceIDs
string
OPTIONAL
A comma-separated list of resource IDs.
start
datetime
OPTIONAL
The start datetime of the event.
Date if isAllDay = 1; datetime otherwise.
Format: yyyy-mm-ddThh:mm:ss.sssZor yyyy-mm-dd hh:mm:ss.sss timezoneend
datetime
OPTIONAL
The end datetime of the event.
Date if isAllDay = 1; datetime otherwise.
Format: yyyy-mm-ddThh:mm:ss.sssZor yyyy-mm-dd hh:mm:ss.sss timezonestartTimezone
string
OPTIONAL
A valid timezone identifier
Example: America/Los_Angeles
endTimezone
string
OPTIONAL
A valid timezone identifier.
Example: America/Los_Angeles
isAllDay
boolean
OPTIONAL
Indicates if the event is an all-day event.
Possible values: 0 or 1.
recurrenceId
integer
OPTIONAL
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
OPTIONAL
Recurring event ruleset string.
For more information on rulesets, see https://datatracker.ietf.org/doc/html/rfc5545.
recurrenceException
string
OPTIONAL
A list of comma-separated start datetimes for all exceptions to this recurring event’s rules.
userUtilizationTypeID
integer
OPTIONAL
The ID of the user utilization type to associate with the event.
userUtilizationType
string
OPTIONAL
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
OPTIONAL
The value of the user utilization type to associate with the event.
resourceUtilizationTypeID
integer
OPTIONAL
The ID of the resource utilization type to associate with the event.
resourceUtilizationType
string
OPTIONAL
The name of the resource utilization type to associate with the event.
Possible values are: units per day or percent per day
resourceUtilizationValue
string
OPTIONAL
The value of the resource utilization type to associate with the event.
RETURN¶ success
boolean
Indicates whether the operation was successful.
Possible values: true or false.
error
string
Contains any error messages if success is false.
If success is true, this field is typically an empty string.
ID
integer
The ID of the updated item
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=updateScheduleEvent&ID=8963&title=MyEvent"
Example Response:
{ "success": true, "error": "", "ID": 1234 }
Delete A Schedule Event¶
GET
/nimAPI.php?q=deleteScheduleEvent
¶Deletes an existing event from the schedule.
PARAMETERS¶ ID
integer
REQUIRED
The ID of the schedule event to delete.
RETURN¶ success
boolean
Indicates whether the operation was successful.
Possible values: true or false.
error
string
Contains any 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=deleteScheduleEvent&ID=8978"
Example Response:
{ "success": true, "error": "" }
Get Schedule Event Statuses¶
GET
/nimAPI.php?q=getScheduleEventStatuses
¶Get all schedule event statuses.
RETURN¶ success
boolean
Indicates whether the operation was successful.
Possible values: true or false.
error
string
Contains any error messages if success is false.
If success is true, this field is typically an empty string.
data
array
An array of objects. Each object includes:
status : The name of the schedule event status
priority : The priority of the schedule event status
color : The color associated with the schedule event status
lower_capacity : Indicates if the status lowers capacity
1 = lowers capacity
0 = does not lower capacity
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=getScheduleEventStatuses"
Example Response:
{ "success": true, "error": "", "data": [ { "status": "Booked", "priority": 0, "color": "#40633b", "lower_capacity": 0 }, { "status": "Available", "priority": 1, "color": "#d76c01", "lower_capacity": 0 }, { "status": "Unavailable", "priority": 2, "color": "#89081d", "lower_capacity": 1 } ] }
Resources¶
Get Resources¶
GET
/nimAPI.php?q=getResources
¶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.
PARAMETERS¶ ID
integer
OPTIONAL
The ID of a resource to query.
name
string
OPTIONAL
Will return all resources matching the name.
description
string
OPTIONAL
Will return all resources partially matching the description.
color
string
OPTIONAL
Will return all resources matching the color.
locationID
integer
OPTIONAL
Will return all resources matching the location ID.
locationName
string
OPTIONAL
Will return all resources matching the locationName.
keywordIDs
string
OPTIONAL
Will return all resources matching the keywordIDs.
Format: A comma separated list of IDs.
keywords
string
OPTIONAL
Will return all resources matching the keywords.
Format: A comma separated list of names.
resourceGroupIDs
string
OPTIONAL
Will return all resources matching the resourceGroupIDs.
Format: A comma separated list of IDs.
resourceGroups
string
OPTIONAL
Will return all resources matching the resourceGroups.
Format: A comma separated list of names.
limit
integer
OPTIONAL
default: 0
Specifies the maximum number of rows to return.
0 = no limit.
offset
integer
OPTIONAL
default: 0
Specifies the number of rows to skip before starting to return rows.
RETURN¶ success
boolean
Indicates whether the operation was successful.
Possible values: true or false.
error
string
Contains any 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 object includes:
ID : The unique identifier for the resource
name : The name of the resource
description : The description of the resource
color : The color of the resource
location : An object containing the location ID and name of the resource
keywords : An array of objects, each containing the keyword ID and name associated with the resource
resourceGroups : An array of objects, each containing the resource group ID and name associated with the resource
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=getResources&name=Houdini License"
Example Response:
{ "success": true, "error": "", "total_count": 42, "data": [ { "ID": 54, "name": "Software License", "description": "All available software licenses.", "color": "#b840d6", "location": { "ID": 1, "name": "Los Angeles" }, "keywords": [ { "ID": "9", "keyword": "Software" } ], "resourceGroups": [ { "ID": "1", "name": "Licenses" } ] } ] }
Add A Resource¶
GET
/nimAPI.php?q=addResource
¶Creates a new resource.
PARAMETERS¶ name
string
REQUIRED
The resource name.
description
string
OPTIONAL
The resource description.
color
string
OPTIONAL
The resource color.
locationID
integer
OPTIONAL
The location ID to associate with the resource.
keywords
string
OPTIONAL
A comma-separated list of keywords.
keywordIDs
string
OPTIONAL
A comma-separated list of keyword IDs.
resourceGroups
string
OPTIONAL
A comma-separated list of resource groups.
resourceGroupIDs
string
OPTIONAL
A comma-separated list of resource group IDs.
RETURN¶ success
boolean
Indicates whether the operation was successful.
Possible values: true or false.
error
string
Contains any error messages if success is false.
If success is true, this field is typically an empty string.
ID
integer
The ID of the newly created item.
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=addResource&name=NewResource"
Example Response:
{ "ID": 62, "success": true, "error": "" }
Update A Resource¶
GET
/nimAPI.php?q=updateResource
¶Updates an existing resource based on the resource ID.
PARAMETERS¶ ID
integer
REQUIRED
The ID of the resource to update.
name
string
OPTIONAL
The resource name.
description
string
OPTIONAL
The resource description.
color
string
OPTIONAL
The resource color.
locationID
integer
OPTIONAL
The location ID to associate with the resource.
keywords
string
OPTIONAL
A comma-separated list of keywords.
keywordIDs
string
OPTIONAL
A comma-separated list of keyword IDs.
resourceGroups
string
OPTIONAL
A comma-separated list of resource groups.
resourceGroupIDs
string
OPTIONAL
A comma-separated list of resource group IDs.
RETURN¶ success
boolean
Indicates whether the operation was successful.
Possible values: true or false.
error
string
Contains any error messages if success is false.
If success is true, this field is typically an empty string.
ID
integer
The ID of the updated item.
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=updateResource&ID=62&name=UpdatedResource"
Example Response:
{ "ID": 62, "success": true, "error": "" }
Delete A Resource¶
GET
/nimAPI.php?q=deleteResource
¶Deletes an existing resource based on the resource ID.
PARAMETERS¶ ID
integer
REQUIRED
The ID of the resource to delete.
RETURN¶ success
boolean
Indicates whether the operation was successful.
Possible values: true or false.
error
string
Contains any 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=deleteResource&ID=8978"
Example Response:
{ "success": true, "error": "" }
Jobs¶
Get User Jobs¶
GET
/nimAPI.php?q=getUserJobs
¶Retrieves all jobs the user is assigned to.
PARAMETERS¶ u
integer
REQUIRED
The user ID to retrieve jobs.
RETURN¶ success
boolean
Indicates whether the operation was successful.
Possible values: true or false.
error
string
Contains any error messages if success is false.
If success is true, this field is typically an empty string.
data
array
An array of objects. Each object includes:
ID : The unique identifier for the job
number : The job number
jobname : The name of the job
folder : The folder associated with the job
description : The description of the job
job_icon : The path to the job icon
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=getUserJobs&u=123"
Example Response:
[ { "ID": 5085, "number": "25004", "jobname": "Example Job", "folder": "25004_Example Job", "description": null, "job_icon": "/media/jobs/5085/icon/example_icon.jpg" } ]
Get Crew¶
GET
/nimAPI.php?q=getCrew
¶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.
PARAMETERS¶ jobID
string
REQUIRED
A single ID or comma-separated list of job IDs.
getData
integer
OPTIONAL
default: 0
Specifies whether to return full data for items.
0 = returns only userIDs
1 = returns full user data
limit
integer
OPTIONAL
default: 0
Specifies the maximum number of rows to return.
0 = no limit
offset
integer
OPTIONAL
default: 0
Specifies the number of rows to skip before starting to return rows.
RETURN¶ success
boolean
Indicates whether the operation was successful.
Possible values: true or false.
error
string
Contains any 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
object
An object where each key is a job ID and the value is an array of crew members. Each crew member object includes:
user_id : The unique identifier for the user
first_name : The first name of the user
last_name : The last name of the user
email : The email address of the user
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=getCrew&jobID=4557,4561"
Example Response:
{ "success": true, "error": "", "total_count": 24, "data": { "4557": { "crew": [ { "user_id": 1, "first_name": "John", "last_name": "Doe", "email": "john.doe@example.com" }, { "user_id": 2, "first_name": "Jane", "last_name": "Smith", "email": "jane.smith@example.com" } ] }, "4561": { "crew": [ { "user_id": 3, "first_name": "Alice", "last_name": "Johnson", "email": "alice.johnson@example.com" }, { "user_id": 4, "first_name": "Bob", "last_name": "Brown", "email": "bob.brown@example.com" } ] } } }
Add Job¶
GET
/nimAPI.php?q=addJob
¶Creates a new job.
Note
If no default job number template is included, either number or numberTemplate must be included.
PARAMETERS¶ name
string
REQUIRED
The name of the job.
number
string
OPTIONAL
The job number.
numberTemplate
string
OPTIONAL
The job number template.
description
string
OPTIONAL
The description of the job.
client_details
string
OPTIONAL
The client details for the job.
agency
string
OPTIONAL
The agency associated with the job.
producer
string
OPTIONAL
The producer of the job.
agency_producer
string
OPTIONAL
The agency producer of the job.
phone
string
OPTIONAL
The phone number associated with the job.
string
OPTIONAL
The email address associated with the job.
prod_co
string
OPTIONAL
The production company associated with the job.
prod_director
string
OPTIONAL
The production director of the job.
prod_contact
string
OPTIONAL
The production contact for the job.
prod_phone
string
OPTIONAL
The production phone number.
prod_email
string
OPTIONAL
The production email address.
prod_shoot_date
date
OPTIONAL
The production shoot date.
Format: YYYY-mm-dd
prod_location
string
OPTIONAL
The production location.
prod_supervised
boolean
OPTIONAL
default: 0
Indicates if the production is supervised.
0 = No
1 = Yes
editorial
string
OPTIONAL
The editorial information.
editor
string
OPTIONAL
The editor of the job.
grading
string
OPTIONAL
The grading information.
colorist
string
OPTIONAL
The colorist of the job.
music
string
OPTIONAL
The music information.
mix
string
OPTIONAL
The mix information.
sound
string
OPTIONAL
The sound information.
creative_lead
string
OPTIONAL
The creative lead for the job.
projectStatus
string
OPTIONAL
default: ACTIVE
The project status.
Possible values: ACTIVE or INACTIVE
Providing a projectStatus will override any job status associated activity status.
folder
string
OPTIONAL
The folder associated with the job.
projectStructureID
integer
OPTIONAL
The project structure ID.
projectStructure
string
OPTIONAL
The project structure.
jobStatusID
integer
OPTIONAL
The job status ID.
jobStatus
string
OPTIONAL
The job status.
biddingLocationID
integer
OPTIONAL
The bidding location ID.
biddingLocation
string
OPTIONAL
The bidding location.
assignedLocationID
integer
OPTIONAL
The assigned location ID.
assignedLocation
string
OPTIONAL
The assigned location.
start_date
date
OPTIONAL
The start date of the job.
Format: YYYY-mm-dd
end_date
date
OPTIONAL
The end date of the job.
Format: YYYY-mm-dd
cultureID
integer
OPTIONAL
The ID of the currency culture to use for the job.
keywords
array
OPTIONAL
An array of keywords.
Format: [“keyword1”,”keyword2”]
contactIDs
string
OPTIONAL
A comma-separated list of contact IDs to link to the job.
Example: 1,2,3
customKeys
dictionary
OPTIONAL
A dictionary of custom keys.
Format: {“Custom Key Name” : “Value”}
RETURN¶ success
boolean
Indicates whether the operation was successful.
Possible values: true or false.
error
string
Contains any error messages if success is false.
If success is true, this field is typically an empty string.
ID
integer
The ID of the newly created item.
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=addJob&name=NewJob"
Example Response:
{ "ID": 5086, "success": true, "error": "" }
Update Job¶
GET
/nimAPI.php?q=updateJob
¶Updates an existing job based on the jobID.
Note
The following values will only be updated if the job is offline:
folder
projectStructureID
projectStructure
PARAMETERS¶ jobID
integer
REQUIRED
The ID of the job to update.
name
string
OPTIONAL
The name of the job.
number
string
OPTIONAL
The job number.
description
string
OPTIONAL
The description of the job.
client_details
string
OPTIONAL
The client details for the job.
agency
string
OPTIONAL
The agency associated with the job.
producer
string
OPTIONAL
The producer of the job.
agency_producer
string
OPTIONAL
The agency producer of the job.
phone
string
OPTIONAL
The phone number associated with the job.
string
OPTIONAL
The email address associated with the job.
prod_co
string
OPTIONAL
The production company associated with the job.
prod_director
string
OPTIONAL
The production director of the job.
prod_contact
string
OPTIONAL
The production contact for the job.
prod_phone
string
OPTIONAL
The production phone number.
prod_email
string
OPTIONAL
The production email address.
prod_shoot_date
date
OPTIONAL
The production shoot date.
Format: YYYY-mm-dd
prod_location
string
OPTIONAL
The production location.
prod_supervised
boolean
OPTIONAL
default: 0
Indicates if the production is supervised.
Possible values: 0 or 1.
editorial
string
OPTIONAL
The editorial information.
editor
string
OPTIONAL
The editor of the job.
grading
string
OPTIONAL
The grading information.
colorist
string
OPTIONAL
The colorist of the job.
music
string
OPTIONAL
The music information.
mix
string
OPTIONAL
The mix information.
sound
string
OPTIONAL
The sound information.
creative_lead
string
OPTIONAL
The creative lead for the job.
projectStatus
string
OPTIONAL
default: ACTIVE
The project status.
Possible values: ACTIVE or INACTIVE.
Providing a projectStatus will override any job status associated activity status.
folder
string
OPTIONAL
The folder associated with the job.
projectStructureID
integer
OPTIONAL
The project structure ID.
projectStructure
string
OPTIONAL
The project structure.
jobStatusID
integer
OPTIONAL
The job status ID.
Including the job status ID will set the project status based on the associated activity status.
jobStatus
string
OPTIONAL
The job status.
Including the job status will set the project status based on the associated activity status.
biddingLocationID
integer
OPTIONAL
The bidding location ID.
biddingLocation
string
OPTIONAL
The bidding location.
assignedLocationID
integer
OPTIONAL
The assigned location ID.
assignedLocation
string
OPTIONAL
The assigned location.
start_date
date
OPTIONAL
The start date of the job.
Format: YYYY-mm-dd
end_date
date
OPTIONAL
The end date of the job.
Format: YYYY-mm-dd
cultureID
integer
OPTIONAL
The ID of the currency culture to use for the job.
keywords
array
OPTIONAL
An array of keywords.
Format: [“keyword1”,”keyword2”]
contactIDs
string
OPTIONAL
A comma-separated list of contact IDs to link to the job.
Example: 1,2,3
customKeys
dictionary
OPTIONAL
A dictionary of custom keys.
Format: {“Custom Key Name” : “Value”}
RETURN¶ success
boolean
Indicates whether the operation was successful.
Possible values: true or false.
error
string
Contains any error messages if success is false.
If success is true, this field is typically an empty string.
ID
integer
The ID of the updated item.
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=updateJob&jobID=5086&name=UpdatedJob"
Example Response:
{ "ID": 5086, "success": true, "error": "" }
Delete Job¶
GET
/nimAPI.php?q=deleteJob
¶Deletes a job based on jobID.
Note
This is a soft delete and these jobs can be recovered or permanently deleted from the UI in the Admin > Jobs > Deleted menu.
PARAMETERS¶ jobID
integer
REQUIRED
The ID of the job to delete.
RETURN¶ success
boolean
Indicates whether the operation was successful.
Possible values: true or false.
error
string
Contains any 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=deleteJob&jobID=8978"
Example Response:
{ "success": true, "error": "" }
Upload Job Icon¶
POST
/nimAPI.php?q=uploadJobIcon
¶Uploads a new job icon for a specified job ID.
Note
File information for the image to be uploaded needs to be included in the $_FILES directive.
PARAMETERS¶ jobID
integer
REQUIRED
The ID of the job to upload the icon for.
RETURN¶ success
boolean
Indicates whether the operation was successful.
Possible values: true or false.
error
string
Contains any error messages if success is false.
If success is true, this field is typically an empty string.
iconPath
string
If successful, the path to the uploaded media will be returned.
Example Request:
curl -F "file=@/path/to/icon.jpg" "http://hostname:portnumber/nimAPI.php?q=uploadJobIcon&jobID=1234"Example Response:
{ "success": true, "error": "", "iconPath": "media/jobs/5088/icon/c02ea16c.jpg" }
Get Job Info¶
GET
/nimAPI.php?q=getJobInfo
¶Retrieves job information for a specified job ID.
Note
Returns limited data if the user does not have permission to view job details.
PARAMETERS¶ jobID
integer
REQUIRED
The ID of the job to retrieve information for.
RETURN¶ success
boolean
Indicates whether the operation was successful.
Possible values: true or false.
error
string
Contains any error messages if success is false.
If success is true, this field is typically an empty string.
data
object
An object containing the job information.
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=getJobInfo&jobID=5025"
Example Response:
{ "success": true, "error": "", "data": { "ID": 5025, "number": "24013", "jobname": "New Job", "description": null, "bgcolor": "#fcb3ff", "textcolor": "#FFFFFF", "start_date": "2024-04-19", "end_date": "2024-07-30", "jobStatusID": 4, "jobStatus": "IN PROGRESS", "job_status_bgcolor": "#539a87", "job_status_textcolor": "#070707", "folder": "24013_New Job", "client_details": "John Doe Details", "biddingLocationID": 1, "biddingLocation": "Los Angeles", "assignedLocationID": 1, "assignedLocation": "Los Angeles", "keywordIDs": null, "keywords": null, "currency": "USD", "is_private": 0, "is_deleted": 0, "agency": "", "agency_producer": "", "agency_phone": "", "agency_email": "", "prodco": "", "director": "", "prod_contact": "", "prod_phone": "", "prod_email": "", "post_producer": "", "post_lead": "", "telecine": "", "colorist": "", "editorial": "", "editor": "", "mix": "", "music": "", "sounddesign": "", "shoot_date": null, "shoot_location": "", "shoot_sup": 0, "proj_status": "ONLINE", "activityStatus": "ACTIVE", "projectStructureID": 19, "structure_created": 1, "securityGroupIDs": null, "securityGroups": null, "client_contacts": [ { "ID": 55, "is_company": 0, "first_name": "John", "last_name": "Doe", "company": "Example Company", "email": "john.doe@example.com" }, { "ID": 79, "is_company": 0, "first_name": "Jane", "last_name": "Doe", "company": "Example Productions", "email": "jane.doe@example.com" } ], "customKeys": [ { "keyID": 25, "keyName": "New Job Key", "typeID": 1, "value": "1234", "dropdownText": "", "linkText": "", "priority": 1, "enabled": 1, "editable": 1 } ] } }
Find Jobs¶
GET
/nimAPI.php?q=findJobs
¶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.
PARAMETERS¶ getData
integer
OPTIONAL
default: 0
Specifies whether to return full data for items.
Possible values: 0 or 1.
The query will return limited data if user does not have permission to view job details.
ID
integer
OPTIONAL
Allows comma-separated list of job IDs.
name
string
OPTIONAL
Will partially match the job name.
number
string
OPTIONAL
Will match the job number.
description
string
OPTIONAL
Will partially match the job description.
startDate
date
OPTIONAL
Format: YYYY-MM-DD
endDate
date
OPTIONAL
Format: YYYY-MM-DD
jobStatusID
integer
OPTIONAL
Job Status ID.
jobStatus
string
OPTIONAL
Job Status Name.
folder
string
OPTIONAL
The job folder name.
client_contactID
integer
OPTIONAL
The ID of a linked contact.
Allows comma-separated list.
client_details
string
OPTIONAL
Will partially match the client details.
biddingLocationID
integer
OPTIONAL
ID of the corresponding locations.
Allows comma-separated list.
biddingLocation
string
OPTIONAL
Name of the bidding location.
assignedLocationID
integer
OPTIONAL
ID of the corresponding locations. Allows comma-separated list.
assignedLocation
string
OPTIONAL
Name of the assigned location.
currency
string
OPTIONAL
Currency code (USD, EUR, etc).
is_private
integer
OPTIONAL
Possible values: 0 or 1.
agency
string
OPTIONAL
Agency.
agency_producer
string
OPTIONAL
Agency Producer.
agency_phone
string
OPTIONAL
Agency Phone.
agency_email
string
OPTIONAL
Agency Email.
production_company
string
OPTIONAL
Production Company.
director
string
OPTIONAL
Director.
prod_contact
string
OPTIONAL
Production Contact.
prod_phone
string
OPTIONAL
Production Phone.
prod_email
string
OPTIONAL
Production Email.
producer
string
OPTIONAL
Producer.
creative_lead
string
OPTIONAL
Creative Lead.
grading
string
OPTIONAL
Grading.
colorist
string
OPTIONAL
Colorist.
editorial
string
OPTIONAL
Editorial.
editor
string
OPTIONAL
Editor.
mix
string
OPTIONAL
Mix.
music
string
OPTIONAL
Music.
sound_design
string
OPTIONAL
Sound Design.
shoot_date
date
OPTIONAL
Format: YYYY-MM-DD
shoot_location
string
OPTIONAL
Shoot Location.
supervised
integer
OPTIONAL
Possible values: 0 or 1.
proj_status
string
OPTIONAL
Possible values: ONLINE or OFFLINE.
activity
string
OPTIONAL
Possible values: ACTIVE or INACTIVE.
keywords
array
OPTIONAL
Allows comma-separated list.
Format: [“keyword1”,”keyword2”]
customKeys
dictionary
OPTIONAL
A dictionary of custom key names and values.
Format: {“Custom Key Name” : “Value”}
include_deleted
integer
OPTIONAL
Possible values: 0 or 1.
limit
integer
OPTIONAL
default: 0
Specifies the maximum number of rows to return.
0 = no limit.
offset
integer
OPTIONAL
default: 0
Specifies the number of rows to skip before starting to return rows.
RETURN¶ success
boolean
Indicates whether the operation was successful.
Possible values: true or false.
error
string
Contains any 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 object includes:
ID : The unique identifier for the job
When getData is set to 1, the full job data is returned.
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=findJobs&name=Example"
Example Response:
{ "success": true, "error": "", "total_count": 38, "data": [ { "ID": 1012 } ] }
Get Job Statuses¶
GET
/nimAPI.php?q=getJobStatuses
¶Returns the list of available job statuses.
RETURN¶ success
boolean
Indicates whether the operation was successful.
Possible values: true or false.
error
string
Contains any error messages if success is false.
If success is true, this field is typically an empty string.
data
array
An array of objects. Each object includes:
ID : The unique identifier for the job status
name : The name of the job status
priority : The priority of the job status
bgcolor : The background color of the job status
textcolor : The text color of the job status
activity_status : The activity status of the job status.
Possible values: active or inactive
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=getJobStatuses"
Example Response:
{ "success": true, "error": "", "data": [ { "ID": 1, "name": "BIDDING", "priority": 0, "bgcolor": "#c5c285", "textcolor": "#000000", "activity_status": "active" }, { "ID": 3, "name": "AWARDED", "priority": 2, "bgcolor": "#94ba77", "textcolor": "#000000", "activity_status": "active" } ] }
Servers & Project Structure¶
Get All Servers¶
GET
/nimAPI.php?q=getServers
¶Retrieves all servers optionally filtered by locationID.
PARAMETERS¶ ID
integer
OPTIONAL
Optional filter by location ID.
RETURN¶ array
An array of objects. Each object includes:
ID : The unique identifier for the server
server : The name of the server
description : The description of the server
locationID : The ID of the location
mountpoint : The mount point of the server
mountsource : The mount source of the server
pub_method : The publication method of the server
0 = Symbolic Link
1 = Copy
path : The Linux path to the server.
winPath : The Windows path to the server
osxPath : The macOS path to the server
priority : The priority of the server
is_projServer : Indicates if the server is a project server.
0 = No
1 = Yes
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=getServers"
Example Response:
[ { "ID": 1, "server": "Server 1", "description": "Primary storage server", "locationID": 1, "mountpoint": "/mnt/server1", "mountsource": null, "pub_method": 0, "path": "/mnt/server1", "winPath": "//Server1/Path", "osxPath": "/Volumes/Server1/Path", "priority": 0, "is_projServer": 1, "userID": 0 } ]
Get Job Servers¶
GET
/nimAPI.php?q=getJobServers
¶Retrieves servers associated with a specified job ID.
PARAMETERS¶ ID
integer
REQUIRED
The ID of the job to retrieve servers for.
RETURN¶ array
An array of objects. Each object includes:
ID : The unique identifier for the server
server : The name of the server
description : The description of the server
locationID : The ID of the location
mountpoint : The mount point of the server
mountsource : The mount source of the server
pub_method : The publication method of the server.
0 = Symbolic Link
1 = Copy
path : The path to the server
winPath : The Windows path to the server
osxPath : The macOS path to the server
priority : The priority of the server
is_projServer : Indicates if the server is a project server.
0 = No
1 = Yes
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=getJobServers&ID=1234"
Example Response:
[ { "ID": 1, "server": "Server 1", "description": "Primary storage server", "locationID": 1, "mountpoint": "/mnt/server1", "mountsource": null, "pub_method": 0, "path": "/mnt/server1", "winPath": "//Server1/Path", "osxPath": "/Volumes/Server1/Path", "priority": 0, "is_projServer": 1 }, { "ID": 2, "server": "Server 2", "description": "Secondary storage server", "locationID": 1, "mountpoint": "/mnt/server2", "mountsource": null, "pub_method": 0, "path": "/mnt/server2", "winPath": "//Server2/Path", "osxPath": "/Volumes/Server2/Path", "priority": 1, "is_projServer": 1 } ]
Get Server Info¶
GET
/nimAPI.php?q=getServerInfo
¶Retrieves server information from server ID.
PARAMETERS¶ ID
integer
REQUIRED
The ID of the server to retrieve information for.
RETURN¶ array
An array of objects. Each object includes:
ID : The unique identifier for the server
server : The name of the server
description : The description of the server
locationID : The ID of the location
mountpoint : The mount point of the server
mountsource : The mount source of the server
pub_method : The publication method of the server
0 = Symbolic Link
1 = Copy
path : The path to the server
winPath : The Windows path to the server
osxPath : The macOS path to the server
priority : The priority of the server
is_projServer : Indicates if the server is a project server.
0 = No
1 = Yes
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=getServerInfo&ID=26"
Example Response:
[ { "ID": 1, "server": "Server 1", "description": "Primary storage server", "locationID": 1, "mountpoint": "/mnt/server1", "mountsource": null, "pub_method": 0, "path": "/mnt/server1", "winPath": "//Server1/Path", "osxPath": "/Volumes/Server1/Path", "priority": 0, "is_projServer": 1 } ]
Get Server OS Path¶
GET
/nimAPI.php?q=getServerOsPath
¶Returns the path to the server based on OS type.
PARAMETERS¶ ID
integer
REQUIRED
The ID of the server.
os
string
REQUIRED
default: Linux
The OS type.
Possible values: win, Windows, osx, mac, Darwin, Linux.
RETURN¶ array
An array of objects. Each object includes:
serverOSPath : The os specific path for the server
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=getServerOsPath&ID=1&os=win"
Example Response:
[ { "serverOSPath": "//Server1/Path" } ]
Get OS Path¶
GET
/nimAPI.php?q=getOsPath
¶Retrieves file path based on file ID and OS type.
PARAMETERS¶ fileID
integer
REQUIRED
The ID of the file.
os
string
REQUIRED
default: Linux
The OS type.
Possible values: win, Windows, osx, mac, Darwin, Linux.
RETURN¶ path
string
path : The os specific path for the file
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=getOsPath&fileID=1234&os=win"
Example Response:
{ "path": "\\Server1\Path\To\File" }
Get Asset Master OS Path¶
GET
/nimAPI.php?q=getAssetMasterOsPath
¶Returns the path to the asset master based on asset ID and OS type.
PARAMETERS¶ assetID
integer
REQUIRED
The ID of the asset.
os
string
REQUIRED
default: Linux
The OS type.
Possible values: win, Windows, osx, mac, Darwin, Linux.
RETURN¶ path
string
The path to the asset master based on the OS type.
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=getAssetMasterOsPath&assetID=1234&os=win"
Example Response:
{ "path": "\\Server1\Path\To\AssetMaster.mb" }
Get Paths¶
GET
/nimAPI.php?q=getPaths
¶Retrieves the NIM path for a project structure given the item ID and the path item to look for.
PARAMETERS¶ ID
integer
REQUIRED
The ID of the item.
item
string
REQUIRED
The item type.
Item Options with the corresponding path item:
job : Project Root
show : Asset Root, Asset Comps, Asset Renders
shot : Show Root
asset : Shot Root, Shot Plates, Shot Comps, Shot Renders
RETURN¶ root
string
The root path for the specified item.
plates
string
The plates path for the specified item.
renders
string
The render path for the specified item.
comps
string
The comp path for the specified item.
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=getPaths&ID=1234&item=job"
Example Response:
{ "root": "Project_Root" }
Resolve Server OS Path¶
GET
/nimAPI.php?q=resolveOSPath
¶Given a path string, this function will look for a matching NIM server and return an OS-centric path based on the OS name provided.
PARAMETERS¶ os
string
REQUIRED
The OS type.
Possible values: linux, win, osx.
path
string
REQUIRED
The path to resolve.
RETURN¶ success
boolean
Indicates whether the operation was successful.
Possible values: true or false.
error
string
Contains any error messages if success is false.
If success is true, this field is typically an empty string.
path
string
The resolved path based on the OS type.
source_os
string
The source OS type.
server
string
The name of the server.
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=resolveOSPath&os=win&path=/mnt/server1/project/file.ext"
Example Response:
{ "success": true, "error": "", "path": "C:\\Server1\\Project\\File.ext", "source_os": "linux", "server": "Server 1" }
Can Bring Online¶
GET
/nimAPI.php?q=canBringOnline
¶Determines if an item can be brought online based on any project structure dependencies.
Note
Item types can be asset or shot.
If asset, jobID or assetID must be passed.
If shot, showID or shotID must be passed.
PARAMETERS¶ item
string
REQUIRED
default: shot
The item type.
Possible values: shot, asset.
jobID
integer
OPTIONAL
The ID of the job.
assetID
integer
OPTIONAL
The ID of the asset.
showID
integer
OPTIONAL
The ID of the show.
shotID
integer
OPTIONAL
The ID of the shot.
RETURN¶ integer
Indicates if the item can be brought online.
1 = Yes
0 = No
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=canBringOnline&item=shot&shotID=1234"
Example Response:
1
Bring Online¶
GET
/nimAPI.php?q=bringOnline
¶Brings assets and shots online, creating folders from the project structure.
Note
Item types can be asset or shot.
If asset, assetID must be passed.
If shot, shotID must be passed.
PARAMETERS¶ type
string
REQUIRED
default: shot
The item type.
Possible values: shot, asset.
assetID
integer
OPTIONAL
The ID of the asset.
shotID
integer
OPTIONAL
The ID of the shot.
RETURN¶ success
boolean
Indicates whether the operation was successful.
Possible values: true or false.
error
string
Contains any 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=bringOnline&type=shot&shotID=1234"
Example Response:
{ "success": true, "error": "" }
Assets¶
Get Assets¶
GET
/nimAPI.php?q=getAssets
¶Returns all assets for a given job ID.
PARAMETERS¶ ID
integer
REQUIRED
The job ID.
RETURN¶ array
An array of objects. Each object includes:
ID : The unique identifier for the asset
name : The name of the asset
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=getAssets&ID=1234"
Example Response:
[ { "ID": 1, "name": "Asset 1" }, { "ID": 2, "name": "Asset 2" } ]
Add Assets¶
GET
/nimAPI.php?q=addAsset
¶Adds a new asset to a job and returns the new assetID.
Note
If an asset with the specified name already exists, NIM will update the existing asset instead of creating a new one with a duplicate name.
An asset status can be passed by either name using assetStatus or ID using assetStatusID. If both are passed, the ID will be used.
PARAMETERS¶ jobID
integer
REQUIRED
The ID of the job.
name
string
REQUIRED
The name of the asset.
assetStatusID
integer
OPTIONAL
The ID of the asset status.
assetStatus
string
OPTIONAL
The name of the asset status.
description
string
OPTIONAL
The description of the asset.
customKeys
dictionary
OPTIONAL
A dictionary of custom keys.
Format: {“Custom Key Name” : “Value”}
RETURN¶ ID
integer
The ID of the newly created asset.
success
boolean
Indicates whether the operation was successful.
Possible values: true or false.
error
string
Contains any error messages if success is false.
If success is true, this field is typically an empty string.
online
boolean
Indicates if the asset is online.
Possible values: true or false.
folders_created
array
An array of paths to the folders created for the asset.
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=addAsset&jobID=1&name=NewAsset"
Example Response:
{ "ID": 1273, "success": true, "error": "", "online": true, "folders_created": [ "/mnt/server1/project/assets/asset1", "/mnt/server1/project/assets/output/asset1", "/mnt/server1/project/assets/output/asset1/renders", "/mnt/server1/project/assets/output/asset1/comps" ] }
Update Assets¶
GET
/nimAPI.php?q=updateAsset
¶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.
PARAMETERS¶ assetID
integer
REQUIRED
The ID of the asset to update.
assetStatusID
integer
OPTIONAL
The ID of the asset status.
assetStatus
string
OPTIONAL
The name of the asset status.
description
string
OPTIONAL
The description of the asset.
customKeys
dictionary
OPTIONAL
A dictionary of custom keys.
Format: {“Custom Key Name” : “Value”}
RETURN¶ ID
integer
The ID of the updated asset.
success
boolean
Indicates whether the operation was successful.
Possible values: true or false.
error
string
Contains any 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=updateAsset&assetID=1273&description=UpdatedDescription"
Example Response:
{ "ID": 1273, "success": true, "error": "" }
Delete Assets¶
GET
/nimAPI.php?q=deleteAsset
¶Deletes an asset based on assetID.
PARAMETERS¶ assetID
integer
REQUIRED
The ID of the asset to delete.
RETURN¶ success
boolean
Indicates whether the operation was successful.
Possible values: true or false.
error
string
Contains any 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=deleteAsset&assetID=1273"
Example Response:
{ "success": true, "error": "" }
Upload Asset Icon¶
POST
/nimAPI.php?q=upload_assetIcon
¶Uploads a thumbnail for an asset.
Note
The $_FILES directive must contain the file for upload.
PARAMETERS¶ assetID
integer
REQUIRED
The ID of the asset.
RETURN¶ success
boolean
Indicates whether the operation was successful.
Possible values: true or false.
error
string
Contains any error messages if success is false.
If success is true, this field is typically an empty string.
iconPath
string
The path to the uploaded icon.
Example Request:
curl -F "file=@/path/to/icon.jpg" "http://hostname:portnumber/nimAPI.php?q=upload_assetIcon&assetID=1234"Example Response:
{ "success": true, "error": "", "iconPath": "media/jobs/1234/asset/5678/icon/asset_icon.jpg" }
Get Asset Info¶
GET
/nimAPI.php?q=getAssetInfo
¶Retrieves information for the asset(s) from the asset ID or comma-separated list of asset IDs.
PARAMETERS¶ ID
integer or string
REQUIRED
The asset ID or comma-separated list of asset IDs.
RETURN¶ array
An array of objects. Each object includes:
jobID : The ID of the job
jobFolder : The folder of the job
jobNumber : The number of the job
jobName : The name of the job
assetID : The ID of the asset
assetName : The name of the asset
AMR_file_ID : The asset master file ID
AMR_path : The asset master path
AMR_filename : The asset master filename
description : The description of the asset
img_link : The link to the asset’s image
asset_status : The status name of the asset
asset_status_ID : The ID of the asset status
asset_status_bgcolor : The background color of the asset status
asset_status_textcolor : The text color of the asset status
securityGroupIDs : The security group IDs
securityGroups : The security groups
customKeys : An array of custom keys. Each object includes:
keyID : The ID of the custom key
keyName : The name of the custom key
typeID : The type ID of the custom key
value : The value of the custom key
dropdownText : The dropdown text of the custom key
linkText : The link text of the custom key
priority : The priority of the custom key
enabled : Indicates if the custom key is enabled
editable : Indicates if the custom key is editable
dropdownOptions : An array of dropdown options. Each object includes:
ID : The ID of the dropdown option
value : The value of the dropdown option
enabled : Indicates if the dropdown option is enabled
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=getAssetInfo&ID=815"
Example Response:
{ "success": true, "error": "", "data": [ { "jobID": 1, "jobFolder": "Project_Folder", "jobNumber": "12345", "jobName": "Project_Name", "assetID": 1, "assetName": "Asset_Name", "AMR_file_ID": 0, "AMR_path": "", "AMR_filename": "", "description": "", "img_link": "/media/jobs/1/assets/Asset_Name_1_icon.jpg", "asset_status": "IN PROGRESS", "asset_status_ID": 3, "asset_status_bgcolor": "#c5c285", "asset_status_textcolor": "#000000", "securityGroupIDs": "", "securityGroups": "", "customKeys": [ { "keyID": 1, "keyName": "Type", "typeID": 3, "value": "3", "dropdownText": "Prop", "linkText": "", "priority": 1, "enabled": 1, "editable": 1, "dropdownOptions": [ { "ID": 1, "value": "Character", "enabled": 1 }, { "ID": 2, "value": "Environment", "enabled": 1 }, { "ID": 3, "value": "Prop", "enabled": 1 } ] } ] } ] }
Get Asset Icon¶
GET
/nimAPI.php?q=getAssetIcon
¶Retrieves the path to the asset’s icon for a given assetID.
PARAMETERS¶ ID
integer
REQUIRED
The ID of the asset.
RETURN¶ array
An array of objects. Each object includes:
img_link : The path to the asset’s icon.
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=getAssetIcon&ID=815"
Example Response:
[ { "img_link": "/media/jobs/4557/assets/asset_icon.jpg" } ]
Get Asset Statuses¶
GET
/nimAPI.php?q=getAssetStatuses
¶Returns the list of available asset statuses.
RETURN¶ success
boolean
Indicates whether the operation was successful.
Possible values: true or false.
error
string
Contains any error messages if success is false.
If success is true, this field is typically an empty string.
data
array
An array of asset statuses. Each object includes:
ID : The unique identifier for the asset status
name : The name of the asset status
priority : The priority of the asset status
bgcolor : The background color of the asset status
textcolor : The text color of the asset status
task_status_ID : The task status ID associated with the asset status
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=getAssetStatuses"
Example Response:
{ "success": true, "error": "", "data": [ { "ID": 4, "name": "NOT STARTED", "priority": 0, "bgcolor": "#bb6060", "textcolor": "#c7c7c7", "task_status_ID": 0 }, { "ID": 5, "name": "COMPLETED", "priority": 0, "bgcolor": "#3f6d3f", "textcolor": "#cccccc", "task_status_ID": 0 } ] }
Shows¶
Get Shows¶
GET
/nimAPI.php?q=getShowInfo
¶Returns all shows for a given job id.
PARAMETERS¶ ID
integer
REQUIRED
The ID of the job.
RETURN¶ array
An array of objects. Each object includes:
ID : The unique identifier for the show.
showname : The name of the show.
folder : The folder name of the show.
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=getShowInfo&ID=1234"
Example Response:
[ { "ID": 1234, "showname": "Example Show", "folder": "example_show" }, { "ID": 1235, "showname": "Example Show 2", "folder": "example_show_2" } ]
Get Show Info¶
GET
/nimAPI.php?q=getShowInfo
¶Returns all show information for a given show ID.
PARAMETERS¶ ID
integer
REQUIRED
The ID of the show.
RETURN¶ array
An array of objects. Each object includes:
ID : The unique identifier for the show.
jobID : The ID of the job.
showname : The name of the show.
folder : The folder name of the show.
show_status : The status of the show.
trt : The total running time of the show.
previs_id : The ID of the previs show.
is_previs : Indicates if the show is a previs show.
has_previs : Indicates if the show has a previs show.
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=getShowInfo&ID=1234"
Example Response:
[ { "ID": 1234, "jobID": 5678, "showname": "Example Show", "folder": "example_show", "show_status": "ONLINE", "trt": "00:00:30", "previs_id": 1235, "is_previs": 0, "has_previs": 1 } ]
Add Show¶
GET
/nimAPI.php?q=addShow
¶Adds a new show to a job and returns the new showID.
Note
If an asset with the specified name already exists, NIM will update the existing asset instead of creating a new one with a duplicate name.
PARAMETERS¶ jobID
integer
REQUIRED
The ID of the job.
name
string
REQUIRED
The name of the show.
trt
string
OPTIONAL
The total running time of the show.
Format: 00:00:00:00
has_previs
boolean
OPTIONAL
Indicates if the show has a previs show.
0 = No
1 = Yes
RETURN¶ ID
integer
The ID of the newly created show.
success
boolean
Indicates whether the operation was successful.
Possible values: true or false.
error
string
Contains any error messages if success is false.
If success is true, this field is typically an empty string.
online
boolean
Indicates if the show is online.
Possible values: true or false.
folders_created
array
An array of paths to the folders created for the show.
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=addShow&jobID=1&name=NewShow"
Example Response:
{ "ID": 2994, "success": true, "error": "", "online": true, "folders_created": [ "/mnt/server1/project/shows/show1", "/mnt/server1/project/shows/show1/images", "/mnt/server1/project/shows/show1/shots", "/mnt/server1/project/shows/show1/plates", "/mnt/server1/project/shows/show1/conform" ] }
Update Show¶
GET
/nimAPI.php?q=updateShow
¶Updates an existing show based on the showID.
Note
The show name will only be updated if the show is offline.
PARAMETERS¶ showID
integer
REQUIRED
The ID of the show to update.
name
string
OPTIONAL
The name of the show.
trt
string
OPTIONAL
The total running time of the show.
Format: 00:00:00:00
RETURN¶ ID
integer
The ID of the updated show.
success
boolean
Indicates whether the operation was successful.
Possible values: true or false.
error
string
Contains any 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=updateShow&showID=2994&name=UpdatedShow"
Example Response:
{ "ID": 1234, "success": true, "error": "" }
Delete Show¶
GET
/nimAPI.php?q=deleteShow
¶Deletes an existing show based on the showID.
PARAMETERS¶ showID
integer
REQUIRED
The ID of the show to delete.
RETURN¶ success
boolean
Indicates whether the operation was successful.
Possible values: true or false.
error
string
Contains any 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=deleteShow&showID=2994"
Example Response:
{ "success": true, "error": "" }
Shots¶
Get Shots¶
GET
/nimAPI.php?q=getShots
¶Returns all shots for a given show ID.
PARAMETERS¶ ID
integer
REQUIRED
The ID of the show.
RETURN¶ array
An array of objects. Each object includes:
ID : The unique identifier for the shot
name : The name of the shot
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=getShots&ID=1234"
Example Response:
[ { "ID": 11034, "name": "SHOT_010" }, { "ID": 11035, "name": "SHOT_020" } ]
Add Shot¶
GET
/nimAPI.php?q=addShot
¶Adds a shot to a show and returns the new ID.
Note
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 using shotStatus or ID using shotStatusID. If both are passed, the ID will be used.
PARAMETERS¶ showID
integer
REQUIRED
The ID of the show.
name
string
REQUIRED
The name of the shot.
shotStatusID
integer
OPTIONAL
The ID of the shot status.
A status can be passed by either name or ID. If both are passed, the ID will be used.
shotStatus
string
OPTIONAL
The name of the shot status.
A status can be passed by either name or ID. If both are passed, the ID will be used.
description
string
OPTIONAL
The description of the shot.
vfx
string
OPTIONAL
The VFX description of the shot.
fps
string
OPTIONAL
The frames per second for the shot.
frames
string
OPTIONAL
The duration of the shot in frames.
handles
string
OPTIONAL
The handles for the shot.
heads
string
OPTIONAL
The heads for the shot.
tails
string
OPTIONAL
The tails for the shot.
height
string
OPTIONAL
The height of the shot.
pan
string
OPTIONAL
The pan of the shot.
tilt
string
OPTIONAL
The tilt of the shot.
roll
string
OPTIONAL
The roll of the shot.
lens
string
OPTIONAL
The lens used for the shot.
fstop
string
OPTIONAL
The f-stop of the shot.
filter
string
OPTIONAL
The filter used for the shot.
dts
string
OPTIONAL
The DTS of the shot.
focus
string
OPTIONAL
The focus of the shot.
ia
string
OPTIONAL
The IA of the shot.
convergence
string
OPTIONAL
The convergence of the shot.
cam_roll
string
OPTIONAL
The camera roll of the shot.
stock
string
OPTIONAL
The stock used for the shot.
format
string
OPTIONAL
The format of the shot.
crop
string
OPTIONAL
The crop of the shot.
protect
string
OPTIONAL
The protection for the shot.
customKeys
dictionary
OPTIONAL
A dictionary of custom keys.
Format: {“Custom Key Name” : “Value”}
RETURN¶ ID
integer
The ID of the newly created shot.
success
boolean
Indicates whether the operation was successful.
Possible values: true or false.
error
string
Contains any error messages if success is false.
If success is true, this field is typically an empty string.
online
boolean
Indicates if the shot is online.
Possible values: true or false.
folders_created
array
An array of paths to the folders created for the shot.
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=addShot&showID=1&name=NewShot"
Example Response:
{ "ID": 17549, "success": true, "error": "", "online": true, "folders_created": [ "/mnt/server1/project/shots/shot1", "/mnt/server1/project/shots/shot1/images", "/mnt/server1/project/shots/shot1/images/renders", "/mnt/server1/project/shots/shot1/images/comps", "/mnt/server1/project/shots/shot1/images/plates", "/mnt/server1/project/shots/shot1/work" ] }
Update Shot¶
GET
/nimAPI.php?q=updateShot
¶Updates an existing shot based on the shotID.
Note
A shot status can be passed by either name using shotStatus or ID using shotStatusID. If both are passed, the ID will be used.
PARAMETERS¶ shotID
integer
REQUIRED
The ID of the shot to update.
shotStatusID
integer
OPTIONAL
The ID of the shot status.
A status can be passed by either name or ID. If both are passed, the ID will be used.
shotStatus
string
OPTIONAL
The name of the shot status.
A status can be passed by either name or ID. If both are passed, the ID will be used.
description
string
OPTIONAL
The description of the shot.
vfx
string
OPTIONAL
The VFX description of the shot.
fps
string
OPTIONAL
The frames per second for the shot.
frames
string
OPTIONAL
The duration of the shot in frames.
handles
string
OPTIONAL
The handles for the shot.
heads
string
OPTIONAL
The heads for the shot.
tails
string
OPTIONAL
The tails for the shot.
height
string
OPTIONAL
The height of the shot.
pan
string
OPTIONAL
The pan of the shot.
tilt
string
OPTIONAL
The tilt of the shot.
roll
string
OPTIONAL
The roll of the shot.
lens
string
OPTIONAL
The lens used for the shot.
fstop
string
OPTIONAL
The f-stop of the shot.
filter
string
OPTIONAL
The filter used for the shot.
dts
string
OPTIONAL
The DTS of the shot.
focus
string
OPTIONAL
The focus of the shot.
ia
string
OPTIONAL
The IA of the shot.
convergence
string
OPTIONAL
The convergence of the shot.
cam_roll
string
OPTIONAL
The camera roll of the shot.
stock
string
OPTIONAL
The stock used for the shot.
format
string
OPTIONAL
The format of the shot.
crop
string
OPTIONAL
The crop of the shot.
protect
string
OPTIONAL
The protection for the shot.
customKeys
dictionary
OPTIONAL
A dictionary of custom keys.
Format: {“Custom Key Name” : “Value”}
RETURN¶ ID
integer
The ID of the updated shot.
success
boolean
Indicates whether the operation was successful.
Possible values: true or false.
error
string
Contains any 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=updateShot&shotID=17549&name=UpdatedShot"
Example Response:
{ "ID": 17549, "success": true, "error": "" }
Delete Shot¶
GET
/nimAPI.php?q=deleteShot
¶Deletes a shot based on shotID.
PARAMETERS¶ shotID
integer
REQUIRED
The ID of the shot to delete.
RETURN¶ success
boolean
Indicates whether the operation was successful.
Possible values: true or false.
error
string
Contains any 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=deleteShot&shotID=17549"
Example Response:
{ "success": true, "error": "" }
Upload Shot Icon¶
POST
/nimAPI.php?q=upload_shotIcon
¶Uploads a thumbnail for a shot.
Note
The $_FILES directive must contain the file for upload.
PARAMETERS¶ shotID
integer
REQUIRED
The ID of the shot.
RETURN¶ success
boolean
Indicates whether the operation was successful.
Possible values: true or false.
error
string
Contains any error messages if success is false.
If success is true, this field is typically an empty string.
iconPath
string
The path to the uploaded icon.
Example Request:
curl -F "file=@/path/to/icon.jpg" "http://hostname:portnumber/nimAPI.php?q=upload_shotIcon&shotID=17543"Example Response:
{ "success": true, "error": "", "iconPath": "media/jobs/5089/shot/17543/icon/example_icon.jpg" }
Get Shot Info¶
GET
/nimAPI.php?q=getShotInfo
¶Retrieves information for the shot(s) from the shot ID or comma separated list of shot IDs.
PARAMETERS¶ ID
integer or string
REQUIRED
The ID or comma separated list of IDs of the shot(s).
RETURN¶ array
An array of objects. Each object includes:
jobID : The unique identifier for the job
jobFolder : The folder name of the job
jobNumber : The number of the job
jobName : The name of the job
showID : The unique identifier for the show
showFolder : The folder name of the show
showName : The name of the show
shotID : The unique identifier for the shot
shotName : The name of the shot
description : The description of the shot
vfx : The VFX description of the shot
fps : The frames per second for the shot
lens : The lens used for the shot
frames : The duration of the shot in frames
handles : The handles for the shot
heads : The heads for the shot
tails : The tails for the shot
height : The height of the shot
pan : The pan of the shot
tilt : The tilt of the shot
roll : The roll of the shot
fstop : The f-stop of the shot
filter : The filter used for the shot
dts : The DTS of the shot
focus : The focus of the shot
IA : The IA of the shot
conv : The convergence of the shot
cam_roll : The camera roll of the shot
stock_type : The stock type used for the shot
film_format : The film format of the shot
crop : The crop of the shot
protect : The protection for the shot
img_link : The link to the shot’s icon
shot_status : The status of the shot
shot_status_ID : The ID of the shot status
shot_status_bgcolor : The background color of the shot status
shot_status_textcolor : The text color of the shot status
securityGroupIDs : The security group IDs associated with the shot
securityGroups : The security groups associated with the shot
customKeys : An array of custom keys associated with the shot. Each object includes:
keyID : The unique identifier for the custom key
keyName : The name of the custom key
typeID : The type ID of the custom key
value : The value of the custom key
dropdownText : The dropdown text of the custom key
linkText : The link text of the custom key
priority : The priority of the custom key
enabled : Indicates if the custom key is enabled
editable : Indicates if the custom key is editable
dropdownOptions : An array of dropdown options for the custom key. Each object includes:
ID : The unique identifier for the dropdown option
value : The value of the dropdown option
enabled : Indicates if the dropdown option is enabled
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=getShotInfo&ID=11034"
Example Response:
[ { "jobID": 4557, "jobFolder": "10000_JOB", "jobNumber": "10000", "jobName": "JOB", "showID": 2330, "showFolder": "SHOW", "showName": "SHOW", "shotID": 11034, "shotName": "SH_010", "description": "The shot description.", "vfx": "The vfx notes.", "fps": "", "lens": "80mm", "frames": 46, "handles": null, "heads": 8, "tails": 8, "height": null, "pan": null, "tilt": null, "roll": null, "fstop": null, "filter": null, "dts": null, "focus": null, "IA": "", "conv": "", "cam_roll": null, "stock_type": null, "film_format": null, "crop": null, "protect": null, "img_link": "/media/jobs/4557/shots/shot_icon.jpg", "shot_status": "IN PROGRESS", "shot_status_ID": 3, "shot_status_bgcolor": "#c5c285", "shot_status_textcolor": "#000000", "securityGroupIDs": "", "securityGroups": "", "customKeys": [ { "keyID": 9, "keyName": "Completion %", "typeID": 1, "value": "80%", "dropdownText": "", "linkText": "", "priority": 1, "enabled": 1, "editable": 1 } ] } ]
Get Shot Icon¶
GET
/nimAPI.php?q=getShotIcon
¶Retrieves the path to the shot’s icon for a given shotID.
PARAMETERS¶ ID
integer
REQUIRED
The ID of the shot.
RETURN¶ array
An array of objects. Each object includes:
img_link : The link to the shot’s icon
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=getShotIcon&ID=11034"
Example Response:
[ { "img_link": "/media/jobs/4557/shots/shot_icon.jpg" } ]
Get Shot Statuses¶
GET
/nimAPI.php?q=getShotStatuses
¶Returns the list of available shot statuses.
RETURN¶ success
boolean
Indicates whether the operation was successful.
Possible values: true or false.
error
string
Contains any error messages if success is false.
If success is true, this field is typically an empty string.
data
array
An array of shot statuses. Each object includes:
ID : The unique identifier for the shot status
name : The name of the shot status
priority : The priority of the shot status
bgcolor : The background color of the shot status
textcolor : The text color of the shot status
task_status_ID : The task status ID associated with the shot status
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=getShotStatuses"
Example Response:
{ "success": true, "error": "", "data": [ { "ID": 3, "name": "IN PROGRESS", "priority": 1, "bgcolor": "#c5c285", "textcolor": "#000000", "task_status_ID": 0 }, { "ID": 4, "name": "COMPLETED", "priority": 2, "bgcolor": "#3f6d3f", "textcolor": "#cccccc", "task_status_ID": 0 } ] }
Tasks¶
Get Task Types¶
GET
/nimAPI.php?q=getTaskTypes
¶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.
PARAMETERS¶ app
string
OPTIONAL
default: all
Filter task type by associated application.
Possible values: MAYA, C4D, AE, NUKE, HIERO, PHOTOSHOP, 3DSMAX, HOUDINI, FLAME, all.
type
string
OPTIONAL
default: artist
Filter task type by associated role type.
Possible values: artist, producer, management, all.
assetID
integer
OPTIONAL
Include tasks used on the asset by ID.
shotID
integer
OPTIONAL
Include tasks used on the shot by ID.
onlyWithFiles
integer
OPTIONAL
default: 0
Flag to return only task types that are associated with files on provided shot or asset.
0 = All task types
1 = Only task types that are associated with files on provided shot or asset
pub
integer
OPTIONAL
default: 0
Optional filter for the onlyWithFiles flag to return only task types with published files.
0 = All task types
1 = Only task types with published files
RETURN¶ array
An array of task types. Each object includes:
ID : The unique identifier for the task type
name : The name of the task type
short_name : The short name of the task type
folder : The folder name of the task type
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=getTaskTypes"
Example Response:
[ { "ID": 4, "name": "ANIM", "short_name": "ANI", "folder": "ANIM" }, { "ID": 3, "name": "TEXTURE", "short_name": "TEX", "folder": "TEX" } ]
Add Task¶
GET
/nimAPI.php?q=addTask
¶Adds a new task to an asset or shot.
Note
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.
PARAMETERS¶ assetID
integer
REQUIRED
The ID of the asset.
Required if shotID is not passed.
shotID
integer
REQUIRED
The ID of the shot.
Required if assetID is not passed.
taskTypeID
integer
REQUIRED
The ID of the task type.
Required if taskTypeName is not passed.
taskTypeName
string
REQUIRED
The name of the task type.
Required if taskTypeID is not passed.
userID
integer
OPTIONAL
The ID of the user.
username
string
OPTIONAL
The username of the user.
taskStatusID
integer
OPTIONAL
The ID of the task status.
taskStatus
string
OPTIONAL
The name of the task status.
description
string
OPTIONAL
The description of the task.
estimated_hours
float
OPTIONAL
The estimated hours for the task.
startDate
UTC datetime string
OPTIONAL
The start date of the task.
Format: YYYY-MM-DD HH:MM:SS
endDate
UTC datetime string
OPTIONAL
The end date of the task.
Format: YYYY-MM-DD HH:MM:SS
customKeys
dictionary
OPTIONAL
A dictionary of custom keys.
Format: {“Custom Key Name” : “Value”}
Example Request:
curl 'http://hostname:portnumber/nimAPI.php?q=addTask&assetID=1&taskTypeID=1&customKeys={"My Custom Key Name":"Some text"}'
Example Response:
{ "ID": "22685", "success": true, "error": "" }
Update Task¶
GET
/nimAPI.php?q=updateTask
¶Updates an existing task based on taskID.
Note
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.
PARAMETERS¶ taskID
integer
REQUIRED
The ID of the task to update.
taskTypeID
integer
OPTIONAL
The ID of the task type.
taskTypeName
string
OPTIONAL
The name of the task type.
userID
integer
OPTIONAL
The ID of the user.
username
string
OPTIONAL
The username of the user.
taskStatusID
integer
OPTIONAL
The ID of the task status.
taskStatus
string
OPTIONAL
The name of the task status.
description
string
OPTIONAL
The description of the task.
estimated_hours
float
OPTIONAL
The estimated hours for the task.
startDate
UTC datetime string
OPTIONAL
The start date of the task.
Format: YYYY-MM-DD HH:MM:SS
endDate
UTC datetime string
OPTIONAL
The end date of the task.
Format: YYYY-MM-DD HH:MM:SS
customKeys
dictionary
OPTIONAL
A dictionary of custom keys.
Format: {“Custom Key Name” : “Value”}
RETURN¶ ID
integer
The ID of the updated task.
success
boolean
Indicates whether the operation was successful.
Possible values: true or false.
error
string
Contains any 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=updateTask&taskID=22685&description=UpdatedDescription"
Example Response:
{ "ID": "22685", "success": true, "error": "" }
Delete Task¶
GET
/nimAPI.php?q=deleteTask
¶Deletes a task based on taskID.
PARAMETERS¶ taskID
integer
REQUIRED
The ID of the task to delete.
RETURN¶ success
boolean
Indicates whether the operation was successful.
Possible values: true or false.
error
string
Contains any 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=deleteTask&taskID=22685"
Example Response:
{ "success": true, "error": "" }
Get Task Info¶
GET
/nimAPI.php?q=getTaskInfo
¶Retrieves information about one or more tasks.
Note
Providing the task ID passed as ID, this function will return the information for a single task.
Providing an asset or shot ID as itemID and setting the class parameter will return information for all tasks associated with the respective item.
PARAMETERS¶ ID
integer
OPTIONAL
The ID of the task.
itemID
integer
OPTIONAL
The ID of the asset or shot.
class
string
OPTIONAL
The class of item for the itemID.
Possible values: asset, shot.
Required if itemID is passed.
RETURN¶ array
An array of objects. Each object includes:
taskID : The unique identifier for the task
typeID : The type ID of the task
taskName : The name of the task
userID : The ID of the user assigned to the task
username : The username of the user assigned to the task
jobID : The ID of the job associated with the task
assetID : The ID of the asset associated with the task
showID : The ID of the show associated with the task
shotID : The ID of the shot associated with the task
taskDesc : The description of the task
task_status_ID : The ID of the task status
task_status : The name of the task status
start_date : The start date of the task
end_date : The end date of the task
progress : The progress of the task
estimated_hours : The estimated hours for the task
customKeys : A dictionary of custom keys associated with the task
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=getTaskInfo&ID=21120"
Example Response:
[ { "taskID": 21120, "typeID": 9, "taskName": "COMP", "userID": 1, "username": "john.doe", "jobID": null, "assetID": null, "showID": null, "shotID": 15839, "taskDesc": "", "task_status_ID": 4, "task_status": "REVIEW", "start_date": "2023-11-23 08:00:00", "end_date": "2023-11-26 08:00:00", "progress": 0, "estimated_hours": "20.00", "customKeys": [] } ]
Get Task Statuses¶
GET
/nimAPI.php?q=getTaskStatuses
¶Returns the list of available task statuses.
RETURN¶ success
boolean
Indicates whether the operation was successful.
Possible values: true or false.
error
string
Contains any error messages if success is false.
If success is true, this field is typically an empty string.
data
array
An array of task statuses. Each object includes:
ID : The unique identifier for the task status
status : The name of the task status
type : The type of the task status
priority : The priority of the task status
bgcolor : The background color of the task status
textcolor : The text color of the task status
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=getTaskStatuses"
Example Response:
{ "success": true, "error": "", "data": [ { "ID": 2, "status": "IN PROGRESS", "type": "active", "priority": 2, "bgcolor": "#c5c285", "textcolor": "#000000" }, { "ID": 7, "status": "COMPLETED", "type": "completed", "priority": 6, "bgcolor": "#3f6d3f", "textcolor": "#e0e0e0" } ] }
Files¶
Get Basenames¶
GET
/nimAPI.php?q=getBasenames
¶Returns all basenames for a show, shot, or asset.
PARAMETERS¶ ID
integer
REQUIRED
The parent ID.
class
string
REQUIRED
The parent class.
Possible values: asset, shot, show.
taskType
string
OPTIONAL
Task type name to filter results.
taskTypeID
integer
OPTIONAL
Task type ID to filter results.
pub
boolean
OPTIONAL
Filter to only return published basenames.
true = Return only published basenames
false = Return all basenames
RETURN¶ array
An array of objects. Each object includes:
basename : The basename of the file.
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=getBasenames&ID=1234&class=shot"
Example Response:
[ { "basename": "SH_010_ANIM" }, { "basename": "SH_010_COMP" }, { "basename": "SH_001_MODEL" } ]
Get Published Basename¶
GET
/nimAPI.php?q=getBasenamePub
¶Retrieves information for the published file for a given basename.
Note
The optional username parameter is used to return the date information in the user’s selected timezone.
PARAMETERS¶ class
string
REQUIRED
The parent class.
Possible values: asset, shot, show.
itemID
integer
REQUIRED
The parent ID.
basename
string
REQUIRED
The basename of the file.
username
string
OPTIONAL
The username to return date information in the user’s selected timezone.
RETURN¶ array
An array of objects. Each object includes:
fileID : The ID of the file.
fileClass : The class of the file’s parent.
parentID : The ID of the parent item.
serverID : The ID of the server where the file is located.
task_type : The task type associated with the file.
task_type_ID : The ID of the file’s task type.
task_type_folder : The folder of the task type.
basename : The basename of the file.
filename : The filename of the file.
filepath : The filepath of the file.
ext : The file extension.
version : The version of the file.
isPublished : Indicates if the file is published.
1 = Published
0 = Not Published
isWorking : Indicates if the file is a working file.
1 = Is a working file
0 = Not a working file
note : The note associated with the file.
userID : The ID of the user who created the file.
username : The username of the user who created the file.
date : The date associated with the file.
metadata : The metadata associated with the file.
customKeys : An dictionary of custom keys associated with the file.
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=getBasenamePub&class=shot&itemID=14245&basename=SH_010_ANIM"
Example Response:
[ { "fileID": 34721, "fileClass": "SHOT", "parentID": 14245, "serverID": 25, "task_type": "", "task_type_ID": 4, "task_type_folder": "ANIM", "basename": "SH_010_ANIM", "filename": "SH_010_ANIM_v03.c4d", "filepath": "/path/to/SH_010_ANIM/", "ext": "c4d", "version": 6, "isPublished": 1, "isWorking": 1, "note": "", "userID": 1, "username": "john.doe", "date": "2022-05-24 11:55:42", "metadata": "{}", "customKeys": { "Status": "" } } ]
Get All Published Basenames¶
GET
/nimAPI.php?q=getBasenameAllPub
¶Retrieves all published basename files for a given asset or shot filtered by task type.
Note
The type parameter represents the task type name.
The optional username parameter is used to return the date information in the user’s selected timezone.
PARAMETERS¶ class
string
REQUIRED
The parent class.
Possible values: asset, shot, show.
itemID
integer
REQUIRED
The ID of the parent item.
type
string
OPTIONAL
Task type name to filter results.
Required if task_type_ID is not passed.
task_type_ID
integer
OPTIONAL
Task type ID to filter results.
Required if type is not passed.
username
string
OPTIONAL
The username to return date information in the user’s selected timezone.
RETURN¶ array
An array of objects. Each object includes:
fileID : The ID of the file.
fileClass : The class of the file’s parent.
parentID : The ID of the parent item.
serverID : The ID of the server where the file is located.
task_type : The task type associated with the file.
task_type_ID : The ID of the file’s task type.
task_type_folder : The folder of the task type.
basename : The basename of the file.
filename : The filename of the file.
filepath : The filepath of the file.
ext : The file extension.
version : The version of the file.
isPublished : Indicates if the file is published.
1 = Published
0 = Not Published
isWorking : Indicates if the file is a working file.
1 = Is a working file
0 = Not a working file
note : The note associated with the file.
userID : The ID of the user who created the file.
username : The username of the user who created the file.
date : The date associated with the file.
metadata : The metadata associated with the file.
customKeys : A dictionary of custom keys associated with the file.
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=getBasenameAllPub&class=shot&itemID=14245&type=ANIM"
Example Response:
[ { "fileID": 34721, "fileClass": "SHOT", "parentID": 14245, "serverID": 25, "task_type": "", "task_type_ID": 4, "task_type_folder": "ANIM", "basename": "SH_010_ANIM", "filename": "SH_010_ANIM_v03.c4d", "filepath": "/path/to/SH_010_ANIM/", "ext": "c4d", "version": 6, "isPublished": 1, "isWorking": 1, "note": "", "userID": 1, "username": "john.doe", "date": "2022-05-24 11:55:42", "metadata": "{}", "customKeys": { "Status": "" } } ]
Get Basename Info¶
GET
/nimAPI.php?q=getBasenamesInfo
¶Retrieves all basenames and their max version for a given asset, shot, or show based on ID.
PARAMETERS¶ ID
integer
REQUIRED
The ID of the parent item.
class
string
REQUIRED
The parent class.
Possible values: asset, shot, show.
task_type_ID
integer
REQUIRED
The task type ID of the files associated with the basename.
RETURN¶ array
An array of objects. Each object includes:
basename : The name of the basename.
maxVersion : The highest file version number in the basename.
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=getBasenamesInfo&ID=1234&class=shot&task_type_ID=4"
Example Response:
[ { "basename": "SH_010_ANIM", "maxVersion": 7 } ]
Get Basename Version¶
GET
/nimAPI.php?q=getBasenameVersion
¶Retrieves the highest version number for a given basename on an asset, shot, or show based on ID.
PARAMETERS¶ class
string
REQUIRED
The parent class.
Possible values: asset, shot, show.
itemID
integer
REQUIRED
The parent ID.
basename
string
REQUIRED
The basename of the file.
RETURN¶ array
An array of objects. Each object includes:
ID : The file ID for the returned version
basename : The basename of the returned version
version : The version number
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=getBasenameVersion&class=shot&itemID=1234&basename=SH_010_ANIM"
Example Response:
[ { "ID": 34722, "basename": "SH_010_ANIM", "version": 7 } ]
Get Versions¶
GET
/nimAPI.php?q=getVersions
¶Retrieves the versions for a given basename.
Note
The optional username parameter is used to return the date information in the user’s selected timezone.
PARAMETERS¶ class
string
REQUIRED
The parent class.
Possible values: asset, shot, show.
itemID
integer
REQUIRED
The parent ID.
basename
string
REQUIRED
The basename in which to find versions.
pub
boolean
OPTIONAL
default: 0
Filter to only return published basenames.
1 = Return only published basenames
0 = Return all basenames
username
string
OPTIONAL
The username to return date information in the user’s selected timezone.
RETURN¶ array
An array of objects. Each object includes:
fileID : The ID of the file.
fileClass : The class of the file.
parentID : The ID of the parent.
serverID : The ID of the server.
task_type : The task type.
task_type_ID : The ID of the task type.
task_type_folder : The folder of the task type.
basename : The basename of the file.
filename : The filename of the file.
filepath : The filepath of the file.
ext : The file extension.
version : The version of the file.
isPublished : Indicates if the file is published.
1 = Published
0 = Not Published
isWorking : Indicates if the file is a working file.
1 = Is a working file
0 = Not a working file
note : The note associated with the file.
userID : The ID of the user who created the file.
username : The username of the user who created the file.
date : The date associated with the file.
metadata : The metadata associated with the file.
customKeys : A dictionary of custom keys associated with the file.
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=getVersions&class=shot&itemID=14245&basename=SH_010_ANIM"
Example Response:
[ { "fileID": 34720, "fileClass": "SHOT", "parentID": 14245, "serverID": 25, "task_type": "", "task_type_ID": 4, "task_type_folder": "ANIM", "basename": "SH_010_ANIM", "filename": "SH_010_ANIM_v03.c4d", "filepath": "/path/to/SH_010_ANIM/", "ext": ".c4d", "version": 7, "isPublished": 1, "isWorking": 1, "note": "", "userID": 1, "username": "john.doe", "date": "2022-05-24 11:49:23", "metadata": "{}", "customKeys": { "Status": "" } } ]
Get Version Info¶
GET
/nimAPI.php?q=getVersionInfo
¶Retrieves the version information of a specified file ID.
PARAMETERS¶ ID
integer
REQUIRED
The ID of the file.
username
string
OPTIONAL
The username to return date information in the user’s selected timezone.
RETURN¶ array
An array of objects. Each object includes:
fileID : The ID of the file.
fileClass : The class of the file.
parentID : The ID of the parent.
serverID : The ID of the server.
task_type : The task type.
task_type_ID : The ID of the task type.
task_type_folder : The folder of the task type.
basename : The basename of the file.
filename : The filename of the file.
filepath : The filepath of the file.
ext : The file extension.
version : The version of the file.
isPublished : Indicates if the file is published.
1 = Published
0 = Not Published
isWorking : Indicates if the file is a working file.
1 = Is a working file
0 = Not a working file
note : The note associated with the file.
userID : The ID of the user who created the file.
username : The username of the user who created the file.
date : The date associated with the file.
metadata : The metadata associated with the file.
customKeys : A dictionary of custom keys associated with the file.
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=getVersionInfo&ID=33307"
Example Response:
[ { "fileID": 33307, "fileClass": "SHOT", "parentID": 11034, "serverID": 25, "task_type": "", "task_type_ID": 4, "task_type_folder": "ANIM", "basename": "ESC_010_ANIM_b1", "filename": "ESC_010_ANIM_b1_v01.mb", "filepath": "/path/to/ESC_010_ANIM_b1/scenes/", "ext": ".mb", "version": 1, "isPublished": 0, "isWorking": 1, "note": "", "userID": 1, "username": "john.doe", "date": "2018-02-21 17:41:30", "metadata": "{}", "customKeys": { "Status": "DECLINED" } } ]
Get Max Version¶
GET
/nimAPI.php?q=getMaxVersion
¶Retrieves the highest version number in a basename for a given fileID.
PARAMETERS¶ fileID
integer
REQUIRED
The ID of the file.
RETURN¶ array
An array of objects. Each object includes:
maxVersion : The highest version number in the basename.
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=getMaxVersion&fileID=1234"
Example Response:
[ { "maxVersion": 7 } ]
Clear Published Flags¶
GET
/nimAPI.php?q=clearPubFlags
¶Clears all published flags from basename.
Note
Run before publishing to clear previous basename published flags.
PARAMETERS¶ class
string
REQUIRED
The parent class type.
Possible values: show, shot, asset.
itemID
integer
REQUIRED
The parent ID.
basename
string
REQUIRED
The basename name to clear.
RETURN¶ result
boolean
Indicates whether the operation was successful.
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=clearPubFlags&class=shot&itemID=1234&basename=SH_010_ANIM"
Example Response:
{ "result": true }
Publish Symbolic Link¶
GET
/nimAPI.php?q=publishSymlink
¶Creates the symbolic link for a published file based on the file ID.
PARAMETERS¶ fileID
integer
REQUIRED
The ID of the file.
forceLink
boolean
OPTIONAL
True
Creates a symbolic link even if the source location is invalid.
Possible values: True, False.
RETURN¶ result
boolean
Indicates whether the operation was successful.
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=publishSymlink&fileID=1234&forceLink=true"
Example Response:
{ "result": true }
Add File¶
GET
/nimAPI.php?q=addFile
¶Saves a file to the NIM database.
PARAMETERS¶ class
string
REQUIRED
Class of parent for the file.
Possible values: show, shot, asset.
itemID
integer
REQUIRED
ID of the parent.
task_type_ID
integer
REQUIRED
Task type ID to associate with the file.
task_type_folder
string
REQUIRED
Task folder to use for the file.
userID
integer
REQUIRED
ID of the user who owns the file.
basename
string
REQUIRED
Basename for the file.
filename
string
REQUIRED
File name of the file being saved.
path
string
REQUIRED
Path to the file.
serverID
integer
REQUIRED
ID of the server where the file exists.
ext
string
OPTIONAL
File extension.
version
integer
OPTIONAL
Version of the file.
note
string
OPTIONAL
Note to add to the file entry.
isPub
boolean
OPTIONAL
default: False
Value of True will publish the file.
Possible values: True, False.
isWork
boolean
OPTIONAL
default: True
Mark file as a working file.
Possible values: True, False.
customKeys
dictionary
OPTIONAL
Dictionary` of custom keys.
Format: {“Custom Key Name” : “Value”}
metadata
dictionary
OPTIONAL
Dictionary of metadata.
Format: {“Key” : “Value”}
RETURN¶ ID
string
The NIM ID of the newly created file.
success
boolean
Indicates whether the operation was successful.
error
string
Contains any error messages if success is false.
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=addFile&class=asset&itemID=1&task_type_ID=4&task_type_folder=ANIM&userID=1&basename=SH_010_ANIM&filename=SH_010_ANIM_v01.c4d&path=/path/to/file&serverID=1"
Example Response:
{ "ID": "35260", "success": true, "error": "" }
Update File¶
GET
/nimAPI.php?q=updateFile
¶Updates an existing file in the NIM database.
PARAMETERS¶ ID
integer
REQUIRED
The ID of the file to update.
task_type_ID
integer
OPTIONAL
Task type ID to associate with the file.
task_type_folder
string
OPTIONAL
Task folder to use for the file.
userID
integer
OPTIONAL
ID of the user who owns the file.
basename
string
OPTIONAL
Basename for the file.
filename
string
OPTIONAL
File name of the file being saved.
filepath
string
OPTIONAL
Path to the file.
ext
string
OPTIONAL
File extension.
version
integer
OPTIONAL
Version of the file.
note
string
OPTIONAL
Comment to add to the file entry.
serverID
integer
OPTIONAL
ID of the server where the file exists.
isPub
boolean
OPTIONAL
False
Value of True will publish the file.
Possible values: True, False.
isWork
boolean
OPTIONAL
True
Mark file as a working file.
Possible values: True, False.
customKeys
dictionary
OPTIONAL
Dictionary of custom keys.
Format: {“Custom Key Name” : “Value”}
metadata
dictionary
OPTIONAL
Dictionary of metadata.
Format: {“Key” : “Value”}
RETURN¶ ID
string
The ID of the updated file.
success
boolean
Indicates whether the operation was successful.
error
string
Contains any error messages if success is false.
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=updateFile&ID=35260&task_type_ID=4&task_type_folder=ANIM&userID=1&basename=SH_010_ANIM&filename=SH_010_ANIM_v01.c4d&filepath=/path/to/file&serverID=1"
Example Response:
{ "ID": "35260", "success": true, "error": "" }
Find Files¶
GET
/nimAPI.php?q=findFiles
¶A search function for files. Any provided parameters will filter the returned list.
PARAMETERS¶ name
string
OPTIONAL
Find matching name.
path
string
OPTIONAL
Find matching path.
parent
string
OPTIONAL
Finds children of the given parent type.
Used with parentID to set the parent item.
Possible values: ASSET, SHOT.
Required when parentID is passed.
parentID
integer
OPTIONAL
Finds children of the parent item with the specified ID.
Required when parent is passed.
metadata
dictionary
OPTIONAL
Find matching metadata.
Format: {“Key” : “Value”}
RETURN¶ array
An array of objects. Each object includes:
ID : The ID of the file.
class : The class of the file.
parentID : The ID of the parent.
serverID : The ID of the server.
task_type : The task type.
task_type_ID : The ID of the task type.
task_type_folder : The folder of the task type.
basename : The basename of the file.
filename : The filename of the file.
filepath : The filepath of the file.
ext : The file extension.
version : The version of the file.
isPublished : Indicates if the file is published.
1 = Published
0 = Not Published
isWorking : Indicates if the file is a working file.
1 = Is a working file
0 = Not a working file
note : The note associated with the file.
userID : The ID of the user who created the file.
username : The username of the user who created the file.
date : The date associated with the file.
metadata : A dictionary of metadata associated with the file.
customKeys : A dictionary of custom keys associated with the file.
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=findFiles&parent=SHOT&parentID=11034"
Example Response:
[ { "ID": 33874, "class": "SHOT", "parentID": 11034, "serverID": 25, "task_type": "", "task_type_ID": 9, "task_type_folder": "COMP", "basename": "SH_010_COMP", "filename": "SH_010_COMP_v01.nk", "filepath": "/path/to/SH_010_COMP/", "ext": ".nk", "version": 1, "isPublished": 0, "isWorking": 1, "note": "", "userID": 1, "username": "john.doe", "date": "2020-02-27 14:57:32", "metadata": "{}", "customKeys": { "Status": "" } } ]
Elements¶
Get Element Types¶
GET
/nimAPI.php?q=getElementTypes
¶Returns the full list of element types.
RETURN¶ array
An array of objects. Each object includes:
ID : The ID of the element type.
name : The name of the element type.
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=getElementTypes"
Example Response:
[ { "ID": 1, "name": "COMPS" } { "ID": 4, "name": "PLATES" }, { "ID": 2, "name": "RENDERS" } ]
Get Element Type¶
GET
/nimAPI.php?q=getElementType
¶Returns the element type name from the ID.
PARAMETERS¶ ID
integer
REQUIRED
The ID of the element.
RETURN¶ array
An array of objects. Each object includes:
name : The name of the element type.
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=getElementType&ID=2"
Example Response:
[ { "name": "RENDERS" } ]
Find Elements¶
GET
/nimAPI.php?q=findElements
¶A search function for elements. Provided parameters will filter the list of elements.
PARAMETERS¶ name
string
OPTIONAL
Find matching the element name.
path
string
OPTIONAL
Find matching the element path.
jobID
integer
OPTIONAL
Find all elements that are children of a job by job ID.
showID
integer
OPTIONAL
Find all elements that are children of a show by show ID
shotID
integer
OPTIONAL
Find all elements that are children of a shot by shot ID
assetID
integer
OPTIONAL
Find all elements that are children of an asset by asset ID
taskID
integer
OPTIONAL
Find all elements that are associated to a task by task ID
renderID
integer
OPTIONAL
Find all elements that are associated to a render by render ID
elementTypeID
integer
OPTIONAL
Find all elements with an element type mathing the element type ID.
ext
string
OPTIONAL
Find all elements with a matching file extension.
metadata
dictionary
OPTIONAL
Find elements with matching metadata.
Format: {“Key” : “Value”}
RETURN¶ array
An array of objects. Each object includes:
ID : The ID of the element.
userID : The ID of the user who created the element.
jobID : The ID of the job.
assetID : The ID of the asset.
shotID : The ID of the shot.
taskID : The ID of the task.
renderID : The ID of the render.
elementTypeID : The ID of the element type.
name : The name of the element.
path : The path to the element.
datetime : The date and time the element was created.
startFrame : The start frame of the element.
endFrame : The end frame of the element.
handles : The handles of the element.
padding : The padding of the element.
isPublished : Indicates if the element is published.
1 = Published
0 = Not Published
metadata : A dictionary of metadata associated with the element.
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=findElements&assetID=816"
Example Response:
[ { "ID": 8026, "userID": 1, "jobID": null, "assetID": 816, "shotID": null, "taskID": null, "renderID": null, "elementTypeID": 7, "name": "sound_ref.wav", "path": "/path/to/elements/", "datetime": "2021-05-24 22:03:15", "startFrame": 1, "endFrame": 250, "handles": 0, "padding": 0, "isPublished": 0, "metadata": "{}" } ]
Get Elements¶
GET
/nimAPI.php?q=getElements
¶Retrieves all elements for a particular type given a parent type and ID.
Note
If elementTypeID is not provided, the query will return elements for all types.
PARAMETERS¶ parent
string
REQUIRED
Parent item of the element.
Possible values: shot, asset, task, render.
parentID
integer
REQUIRED
ID of the parent item.
elementTypeID
integer
OPTIONAL
ID of the element type.
getLastElement
boolean
OPTIONAL
default: False
Return only the last published element.
True = Return only the last published element
False = Return all elements
isPublished
boolean
OPTIONAL
default: False
Return only the published elements.
True = Return only published elements
False = Return all elements
RETURN¶ array
An array of objects. Each object includes:
ID : The ID of the element.
userID : The ID of the user who created the element.
jobID : The ID of the job.
assetID : The ID of the asset.
shotID : The ID of the shot.
taskID : The ID of the task.
renderID : The ID of the render.
elementTypeID : The ID of the element type.
elementType : The name of the element type.
name : The name of the element.
path : The path to the element.
datetime : The date and time the element was created.
startFrame : The start frame of the element.
endFrame : The end frame of the element.
handles : The handles of the element.
padding : The padding of the element.
full_path : The full path to the element.
isPublished : Indicates if the element is published.
1 = Published
0 = Not Published
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=getElements&parent=render&parentID=3330"
Example Response:
[ { "ID": 6527, "userID": 1, "jobID": null, "assetID": null, "shotID": null, "taskID": null, "renderID": 3330, "elementTypeID": 1, "elementType": "COMPS", "name": "SH_01_FX_v04.#####.exr", "path": "/path/to/RENDER", "datetime": "2018-02-14 05:42:59", "startFrame": 1, "endFrame": 150, "handles": 8, "padding": 0, "full_path": "/path/to/RENDER/SH_01_FX_v04.#####.exr", "isPublished": 1 } ]
Add Element¶
GET
/nimAPI.php?q=addElement
¶Adds an element to an asset, shot, task, or render.
PARAMETERS¶ parent
string
REQUIRED
default: shot
Parent of the element.
Possible values: shot, asset, task, render.
parentID
integer
REQUIRED
ID of the parent object.
userID
integer
OPTIONAL
ID of the user who created the element.
typeID
integer
REQUIRED
ID of the element type to associate with the element.
path
string
REQUIRED
Folder path to the element.
name
string
REQUIRED
Name of the element.
startFrame
integer
OPTIONAL
If a sequence, this is the start frame.
endFrame
integer
OPTIONAL
If a sequence, this is the end frame.
handles
integer
OPTIONAL
If a sequence, this is the handle length.
isPublished
boolean
OPTIONAL
default: False
Should element be flagged as published.
True = Published
False = Not Published
metadata
dictionary
OPTIONAL
Dictionary of metadata (Internal).
Format: {“Key” : “Value”}
RETURN¶ result
boolean
Indicates whether the operation was successful.
ID
string
The ID of the newly created element.
error
string
Contains any error messages if result is false.
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=addElement&parent=asset&parentID=816&typeID=7&path=/path/to/elements/&name=sound_ref.wav"
Example Response:
{ "result": true, "ID": "1234", "error": "" }
Update Element¶
GET
/nimAPI.php?q=updateElement
¶Updates an existing element by element ID.
PARAMETERS¶ ID
integer
REQUIRED
The ID of the element to update.
userID
integer
OPTIONAL
The ID of the user.
jobID
integer
OPTIONAL
The ID of the job.
assetID
integer
OPTIONAL
The ID of the asset.
shotID
integer
OPTIONAL
The ID of the shot.
taskID
integer
OPTIONAL
The ID of the task.
renderID
integer
OPTIONAL
The ID of the render.
elementTypeID
integer
OPTIONAL
The ID of the element type.
name
string
OPTIONAL
The name of the element.
path
string
OPTIONAL
The path to the element.
startFrame
integer
OPTIONAL
The start frame of the element.
endFrame
integer
OPTIONAL
The end frame of the element.
handles
integer
OPTIONAL
The handles of the element.
isPublished
boolean
OPTIONAL
default: False
Indicates if the element should be flagged as published.
True = Published
False = Not Published
metadata
dictionary
OPTIONAL
Dictionary of metadata.
Format: {“Key” : “Value”}
RETURN¶ success
boolean
Indicates whether the operation was successful.
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=updateElement&ID=8026&name=sound_ref_updated.wav"
Example Response:
{ "success": true }
Delete Element¶
GET
/nimAPI.php?q=deleteElement
¶Deletes an existing element by element ID.
PARAMETERS¶ ID
integer
REQUIRED
The ID of the element to delete.
RETURN¶ success
boolean
Indicates whether the operation was successful.
error
string
Contains any error messages if success is false.
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=deleteElement&ID=8026"
Example Response:
{ "success": true, "error": "" }
Get Element Exports¶
GET
/nimAPI.php?q=getElementExport
¶Retrieves all element export settings for a given file ID.
Note
Used in conjunction with the NIM Photoshop connector for configuring element export settings.
PARAMETERS¶ ID
integer
REQUIRED
The ID of the file.
RETURN¶ array
An array of objects. Each object includes:
ID : The ID of the export setting.
fileID : The ID of the file.
isElement : Indicates if the item is an element.
elementTypeID : The ID of the element type.
export : Indicates if it should be exported.
extension : The extension to be used for the export element.
bitDepth : The bit depth to be used for the export element.
resolution : The resolution scale of the export element compared to the source file.
epsPreview : EPS preview setting.
epsEncoding : EPS encoding setting.
epsHalftone : EPS halftone setting.
epsTransferFunction : EPS transfer function setting.
epsPostScriptColor : EPS PostScript color setting.
epsVectorData : EPS vector data setting.
epsInterpolation : EPS interpolation setting.
jpgQuality : JPG quality setting.
jpgFormat : JPG format setting.
jpgScans : JPG scans setting.
pngCompression : PNG compression setting.
pngInterlaced : PNG interlaced setting.
tgaResolution : TGA resolution setting.
tgaCompress : TGA compress setting.
tifImageCompression : TIF image compression setting.
tifSaveImagePyramid : TIF save image pyramid setting.
tifSaveTransparency : TIF save transparency setting.
tifPixelOrder : TIF pixel order setting.
tifByteOrder : TIF byte order setting.
tifLayerCompression : TIF layer compression setting.
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=getElementExport&ID=35255"
Example Response:
[ { "ID": 197, "fileID": 35255, "isElement": 1, "elementTypeID": 7, "export": 1, "extension": "jpg", "bitDepth": 8, "resolution": "1.00", "epsPreview": 0, "epsEncoding": 0, "epsHalftone": 0, "epsTransferFunction": 0, "epsPostScriptColor": 0, "epsVectorData": 0, "epsInterpolation": 0, "jpgQuality": 3, "jpgFormat": 0, "jpgScans": 0, "pngCompression": 0, "pngInterlaced": 0, "tgaResolution": 1, "tgaCompress": 1, "tifImageCompression": 0, "tifSaveImagePyramid": 0, "tifSaveTransparency": 0, "tifPixelOrder": 0, "tifByteOrder": 0, "tifLayerCompression": 0 } ]
Set Element Exports¶
GET
/nimAPI.php?q=setElementExports
¶Sets the element export settings for a given file ID. Used in conjunction with setting Photoshop export settings.
PARAMETERS¶ fileID
integer
REQUIRED
The ID of the file to associate the element export settings.
exports
dictionary
REQUIRED
A dictionary of export settings used by the NIM Photoshop connector.
The export dictionary requires the following settings:
isElement : Indicates if it is an element.
elementTypeID : The ID of the element type.
export : Indicates if it should be exported.
extension : The file extension to be used for the export element.
bitDepth : The bit depth to be used for the export element.
resolution : The resolution scale of the export element compared to the source file.
epsPreview : EPS preview setting.
epsEncoding : EPS encoding setting.
epsHalftone : EPS halftone setting.
epsTransferFunction : EPS transfer function setting.
epsPostScriptColor : EPS PostScript color setting.
epsVectorData : EPS vector data setting.
epsInterpolation : EPS interpolation setting.
jpgQuality : JPG quality setting.
jpgFormat : JPG format setting.
jpgScans : JPG scans setting.
pngCompression : PNG compression setting.
pngInterlaced : PNG interlaced setting.
tgaResolution : TGA resolution setting.
tgaCompress : TGA compress setting.
tifImageCompression : TIF image compression setting.
tifSaveImagePyramid : TIF save image pyramid setting.
tifSaveTransparency : TIF save transparency setting.
tifPixelOrder : TIF pixel order setting.
tifByteOrder : TIF byte order setting.
tifLayerCompression : TIF layer compression setting.
RETURN¶ success
boolean
Indicates whether the operation was successful.
error
string
Contains any error messages if success is false.
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=setElementExports&fileID=35255&exports={...}"
Example Response:
{ "error": "", "success": true }
Render¶
Add Render¶
GET
/nimAPI.php?q=addRender
¶Logs a render to a given taskID.
PARAMETERS¶ taskID
integer
REQUIRED
ID of the task to log the render.
jobID
integer
OPTIONAL
ID of the job to log the render.
class
string
OPTIONAL
shot
Determines if the render is associated with an asset or shot.
Possible values: asset, shot.
fileID
integer
OPTIONAL
ID of a file to associate with the render.
renderKey
string
OPTIONAL
Unique key for render to link to external database or render management software.
renderName
string
OPTIONAL
Name of the render.
renderType
string
OPTIONAL
Type of render
When used with Deadline Render Manager, values would be mayaPlugin, nukePlugin, etc.
renderComment
string
OPTIONAL
Comment to add to the render.
outputDirs
json array
OPTIONAL
Array of output directories from the render.
outputFiles
json array
OPTIONAL
Array of output files from the render.
elementTypeID
integer
OPTIONAL
ID of the element type to use for the render.
start_datetime
datetime
OPTIONAL
Datetime value for the start of the render.
end_datetime
datetime
OPTIONAL
Datetime value for the end of the render.
avgTime
string
OPTIONAL
Average time of the render.
totalTime
string
OPTIONAL
Total time of the render.
iconPath
string
OPTIONAL
Path to the render icon.
frames
integer
OPTIONAL
The total frame count of the render.
RETURN¶ success
boolean
Indicates whether the operation was successful.
error
string
Contains any error messages if success is false.
ID
string
The ID of the newly created render.
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=addRender&taskID=123&renderName=TestRender"
Example Response:
{ "success": true, "error": "", "ID": "1234" }
Upload Render Icon¶
POST
/nimAPI.php?q=uploadRenderIcon
¶Uploads an icon for a render.
Note
The $_FILES[] directive must contain the file for upload.
PARAMETERS¶ renderID
integer
OPTIONAL
ID of the render to add the icon.
Required if renderKey is not passed.
renderKey
string
OPTIONAL
RenderKey of the render to add the icon.
Required if renderID is not passed.
RETURN¶ success
boolean
Indicates whether the operation was successful.
error
string
Contains any error messages if success is false.
iconPath
string
The path to the uploaded icon.
Example Request:
curl -F "file=@/path/to/icon.jpg" "http://hostname:portnumber/nimAPI.php?q=uploadRenderIcon&renderID=5678"Example Response:
{ "success": true, "error": "", "iconPath": "media/jobs/1234/render/5678/icon/render_icon.jpg" }
Get Last Shot Render¶
GET
/nimAPI.php?q=getLastShotRender
¶Retrieves the latest render for a shot.
PARAMETERS¶ ID
integer
REQUIRED
ID of the shot to retrieve the last render.
RETURN¶ ID
integer
The ID of the render.
jobID
integer
The ID of the associated job.
class
string
The class of the render.
taskID
integer
The ID of the associated task.
fileID
integer
The ID of the associated file.
userID
integer
The ID of the user who created the render.
renderKey
string
The render key.
renderName
string
The name of the render.
renderType
string
The type of the render.
comment
string
The comment for the render.
date
datetime
The date of the render.
outputDirs
json array
The output directories of the render.
outputFiles
json array
The output files of the render.
frames
integer
The total frame count of the render.
start_datetime
datetime
The start datetime of the render.
end_datetime
datetime
The end datetime of the render.
avgTime
string
The average time of the render.
totalTime
string
The total time of the render.
iconPath
string
The path to the render icon.
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=getLastShotRender&ID=1234"
Example Response:
[ { "ID": 3645, "jobID": null, "class": null, "taskID": 22680, "fileID": null, "userID": 1, "renderKey": null, "deadlineID": null, "renderName": "My Render", "renderType": null, "comment": null, "date": "2025-02-21 23:51:24", "outputDirs": null, "outputFiles": null, "frames": null, "start_datetime": null, "end_datetime": null, "avgTime": null, "totalTime": null, "iconPath": null } ]
Review¶
Get Review Item Types¶
GET
/nimAPI.php?q=getReviewItemTypes
¶Retrieves the ID and name for all review item types.
RETURN¶ array
An array of objects. Each object includes:
ID : The ID of the review item type
name : The name of the review item type
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=getReviewItemTypes"
Example Response:
[ { "ID": 1, "name": "Review" }, { "ID": 2, "name": "Edit" }, { "ID": 3, "name": "Reference" } ]
Get Review Item Statuses¶
GET
/nimAPI.php?q=getReviewStatuses
¶Retrieves available review item statuses.
RETURN¶ success
boolean
Indicates whether the operation was successful.
error
string
Contains any generated error messages if success is false.
data
array
An array of objects. Each object includes:
ID : The ID of the review item status.
name : The name of the review item status.
priority : The priority of the review item status.
bgcolor : The background color of the review item status.
textcolor : The text color of the review item status.
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=getReviewStatuses"
Example Response:
{ "success": true, "error": "", "data": [ { "ID": 2, "name": "Approved", "priority": 2, "bgcolor": "#65a467", "textcolor": "#000000" }, { "ID": 3, "name": "Ready for Posting", "priority": 0, "bgcolor": "#6c546f", "textcolor": "#ffffff" } ] }
Get Task Review Items¶
GET
/nimAPI.php?q=getTaskReviewItems
¶Retrieves review items for the specified taskID.
PARAMETERS¶ taskID
integer
REQUIRED
ID of the task to retrieve review items.
RETURN¶ array
An array of objects. Each object includes:
ID : The unique identifier for the review item.
name : The name of the review item.
filepath : The filepath to the review item.
iconPath : The path to the review icon.
dailiesMP4 : The path of the source mp4 if available.
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.
comment : The text of the render comment.
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=getTaskReviewItems&taskID=1234"
Example Response:
[ { "ID": 4665, "name": "SH_01_FX_v04", "filepath": null, "iconPath": "/media/jobs/4557/review/render/3330/202105/a249233b_icon.jpg", "dailiesMP4": "media/jobs/4557/review/render/3330/202105/a249233b_icon.mp4", "submitted": 0, "renderID": 3330, "renderName": "SH_01_FX_v04.mp4", "frames": "150", "avgTime": null, "totalTime": null, "renderDate": "2018-02-12 21:36:11", "renderIconPath": "/media/jobs/4557/dailies/17789/436db3df_icon.jpg", "comment": "" } ]
Upload Review Item¶
POST
/nimAPI.php?q=uploadReviewItem
¶Uploads a review item to a given context.
Note
The $_FILES[] directive must contain the file for upload.
The uploaded file must be an image, PDF, or video.
PARAMETERS¶ itemID
integer
REQUIRED
ID of the parent item.
itemType
string
REQUIRED
The type of parent item.
Valid values: user, job, show, shot, task, render.
name
string
OPTIONAL
The name of the review item.
description
string
OPTIONAL
The description of the review item.
reviewItemTypeID
integer
OPTIONAL
The ID for the review item type.
reviewItemStatusID
integer
OPTIONAL
The ID for the review item status.
keywords
array string
OPTIONAL
An array of keywords to associate.
Format: [“keyword1”,”keyword2”]
RETURN¶ success
boolean
Indicates whether the operation was successful.
Possible values: true, false
error
string
Contains any generated error messages if success is false.
If success is true, this field is typically an empty string.
ID
string
The ID of the newly created review item.
itemType
string
The type of the parent item.
itemID
string
The ID of the parent item.
mediaType
string
The type of the media (e.g., image, pdf, video).
Example Request:
curl -F "file=@/path/to/media.mp4" "http://hostname:portnumber/nimAPI.php?q=uploadReviewItem&itemID=22679&itemType=task&name=ReviewItemName"Example Response:
{ "success": true, "error": "", "ID": "5170", "itemType": "task", "itemID": "22679", "mediaType": "video" }
Upload Review Note¶
POST
/nimAPI.php?q=uploadReviewNote
¶Uploads a note to an existing review item with an optional associated image.
Note
The $_FILES[] directive must contain the file for upload.
The uploaded file must be an image.
PARAMETERS¶ ID
integer
REQUIRED
ID of the review item to add the note.
name
string
OPTIONAL
The name of the note.
note
string
OPTIONAL
The text of the note.
frame
integer
OPTIONAL
default: 0
Frame number to associate with the note.
time
string
OPTIONAL
default: -1
Time in the movie to associate with the note.
If this note is not frame specific, -1 can be used.
userID
integer
REQUIRED
User ID of the note owner.
RETURN¶ success
boolean
Indicates whether the operation was successful.
Possible values: true, 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 -F "file=@/path/to/image.jpg" "http://hostname:portnumber/nimAPI.php?q=uploadReviewNote&ID=1234&name=NoteName¬e=This%20is%20a%20note&frame=100&time=00:01:40&userID=5678"Example Response:
{ "success": true, "error": "" }
Get Review Items¶
GET
/nimAPI.php?q=getReviewItems
¶Returns the child review items and details for the given parent item.
Note
type or typeID can be used to filter the returned review items by the given review type name or review type ID.
status or statusID can be used to filter the returned review items by the given status name or review status ID.
keyword or keywordID can be used to filter the returned review items by the given keyword name or review keyword ID.
PARAMETERS¶ parentType
string
REQUIRED
The type of the parent item.
Valid values: user, job, dev, asset, show, shot, task, render.
parentID
integer
REQUIRED
The ID of the parent item.
allChildren
integer
OPTIONAL
Determines if review items associated with child items should be returned. For example, if parent is a show, setting this to 1 would return review items on the show as well as child shots, tasks, and renders.
Possible values: 0 (no) or 1 (yes).
name
string
OPTIONAL
Filters the returned review items by the given name.
description
string
OPTIONAL
Filters the returned review items to items that contain the given string.
date
date
OPTIONAL
Filters the returned review items by the given date.
Format: yyyy-mm-dd
typeID
integer
OPTIONAL
Filters the returned review items by the given review type ID.
type
string
OPTIONAL
Filters the returned review items by the given review type name.
statusID
integer
OPTIONAL
Filters the returned review items by the given review status ID.
status
string
OPTIONAL
Filters the returned review items by the given review status name.
keywordID
integer
OPTIONAL
Filters the returned review items by the given review keyword ID.
keyword
string
OPTIONAL
Filters the returned review items by the given review keyword name.
RETURN¶ success
boolean
Indicates whether the operation was successful.
Possible values: true, false
error
string
Contains any generated error messages if success is false.
If success is true, this field is typically an empty string.
data
array
An array of objects. Each object includes:
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.
reviewItemType : The name of the review item type.
reviewItemGroupID : The group ID for review items belonging to a set of versions.
reviewItemStatusID : The associated review item status ID.
reviewItemStatus : The name of the review item status.
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 : The width of the media.
height : The 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 creator’s user ID.
creatorFullName : The creator’s full name.
itemType : The type of parent this review item is associated with.
itemID : The ID of the parent item.
mediaType : The type of media (e.g., image, pdf, video).
mediaPath : The path to the uploaded media.
keywordIDs : The IDs of the associated keywords.
keywords : The names of the associated keywords.
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=getReviewItems&parentType=asset&parentID=1"
Example Response:
{ "success": true, "error": "", "data": [ { "ID": 5159, "renderKey": null, "name": "Car Review Item", "description": null, "reviewItemTypeID": 1, "reviewItemGroupID": 0, "reviewItemStatusID": 3, "iconPath": "/media/jobs/5083/review/job/202501/2b09333a_icon.jpg", "mp4": null, "ogv": null, "webm": null, "filmstrip": "", "width": 960, "height": 640, "duration": "0.000000000000", "frames": 0, "frame_rate": "0.000000000000", "date": "2025-01-28 18:22:26", "creatorUserID": 1, "itemType": "job", "itemID": 5083, "mediaType": "image", "mediaPath": "media/jobs/5083/review/job/202501/2b09333a_icon.png", "keywordIDs": "4", "keywords": "Cars", "reviewItemType": "Edit", "reviewItemStatus": "Ready for Posting", "creatorFullName": "John Doe" } ] }
Get Review Item¶
GET
/nimAPI.php?q=getReviewItem
¶Returns the details for the given review item ID.
PARAMETERS¶ ID
integer
REQUIRED
ID of the review item.
RETURN¶ success
boolean
Indicates whether the operation was successful.
Possible values: true, 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 containing the details of the review item. The object includes:
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.
reviewItemType : The name of the review item type.
reviewItemGroupID : The group ID for review items belonging to a set of versions.
reviewItemStatusID : The associated review item status ID.
reviewItemStatus : The name of the review item status.
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 : The width of the media.
height : The 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 creator’s user ID.
creatorFullName : The creator’s full name.
itemType : The type of parent this review item is associated with.
itemID : The ID of the parent item.
mediaType : The type of media (e.g., image, pdf, video).
mediaPath : The path to the uploaded media.
keywordIDs : The IDs of the associated keywords.
keywords : The names of the associated keywords.
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=getReviewItem&ID=5159"
Example Response:
{ "success": true, "error": "", "data": { "ID": 5159, "renderKey": null, "name": "example_review_item", "description": null, "reviewItemTypeID": 1, "reviewItemType": "Daily", "reviewItemGroupID": 0, "reviewItemStatusID": 3, "reviewItemStatus": "Ready for Posting", "iconPath": "/media/jobs/5083/review/job/202501/example_icon.jpg", "mp4": null, "ogv": null, "webm": null, "filmstrip": "", "width": 960, "height": 640, "duration": "0.000000000000", "frames": 0, "frame_rate": "0.000000000000", "date": "2025-01-28 18:22:26", "creatorUserID": 1, "creatorFullName": "John Doe", "itemType": "job", "itemID": 5083, "mediaType": "image", "mediaPath": "media/jobs/5083/review/job/202501/example_image.png", "keywordIDs": "4", "keywords": "example_keyword" } }
Get Review Item Notes¶
GET
/nimAPI.php?q=getReviewNotes
¶Returns all notes for a given review item ID.
PARAMETERS¶ ID
integer
REQUIRED
ID of the review item.
RETURN¶ success
boolean
Indicates whether the operation was successful.
Possible values: true, false
error
string
Contains any generated error messages if success is false.
If success is true, this field is typically an empty string.
data
array
An array of objects. Each object includes:
ID : The ID of the note.
type : The type of the note.
item_ID : The ID of the review item.
date : The date the note was created.
user_ID : The ID of the user who created the note.
user_full_name : The full name of the user who created the note.
subject : The subject of the note.
note : The text of the note.
isHTML : Indicates if the note is in HTML format.
0 = no
1 = yes
renderID : The ID of the associated render.
img_path : The path to the image associated with the note.
note_img_path : The path to the note annotation image.
This is a transparent image of the annotation that can be overlaid on the review item.
frame : The frame number associated with the note.
time : The time associated with the note.
parentID : The ID of the parent note if this is a reply.
isAddressed : Indicates if the note has been addressed.
0 = no
1 = yes
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=getReviewNotes&ID=5159"
Example Response:
{ "success": true, "error": "", "data": [ { "ID": 13166, "type": "dailies", "item_ID": 5159, "date": "2025-01-28 18:30:19", "user_ID": 1, "subject": "", "note": "", "isHTML": 0, "renderID": 0, "img_path": "/media/jobs/5159/review/job/202501/notes/example_image.jpg", "note_img_path": "/media/jobs/5159/review/job/202501/notes/example_note_annotation.png", "frame": 1, "time": 0, "parentID": null, "isAddressed": 0, "user_full_name": "John Doe" } ] }
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¶
GET
/nimAPI.php?q=getTimecards
¶Retrieves a timecard, or array of timecards based on search criteria.
Note
A user can be passed by either username or userID. If both are passed the userID will be used.
A task type 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 jobID is provided, the startDate and endDate are not required.
If jobID is not provided, both startDate and endDate must be provided.
PARAMETERS¶ startDate
date
OPTIONAL
The start date for the timecard search
Format: yyyy-mm-dd
Required if jobID is not provided.
endDate
date
OPTIONAL
The end date for the timecard search
Format: yyyy-mm-dd
Required if jobID is not provided.
jobID
integer
OPTIONAL
The ID of the job.
Required if startDate and endDate are not provided.
userID
integer
OPTIONAL
The ID of the user.
username
string
OPTIONAL
The username of the user.
taskTypeID
integer
OPTIONAL
The ID of the task type.
taskType
string
OPTIONAL
The name of the task type.
taskID
integer
OPTIONAL
The ID of the task.
locationID
integer
OPTIONAL
The ID of the location.
location
string
OPTIONAL
The name of the location.
RETURN¶ array
An array of objects. Each object includes:
ID : The ID of the timecard.
date : The date of the timecard.
userID : The ID of the user.
username : The username of the user.
user_full_name : The full name of the user.
start_time : The start time of the timecard.
end_time : The end time of the timecard.
hrs : The total hours worked.
break_hrs : The break hours.
total_hrs : The total hours including breaks.
ot : The overtime hours.
dt : The double time hours.
jobID : The ID of the job.
jobnumber : The job number.
jobname : The job name.
taskTypeID : The ID of the associated task type.
taskType : The name of the associated task type.
taskID : The ID of the associated task.
locationID : The ID of the associated location.
location : The name of the associated location.
description : The description of the work done.
submittedID : The ID of the person who the timecard was submitted to.
submittee : The name of the person who the timecard was submitted to.
submittedTime : The datetime the timecard was submitted.
approverID : The ID of the person who approved the timecard.
approver : The name of the person who approved the timecard.
approvalTime : The datetime the timecard was approved.
disputedID : The ID of the person who disputed the timecard.
disputer : The name of the person who disputed the timecard.
disputedTime : The datetime the timecard was disputed.
disputedNote : The note explaining the dispute.
status : The status of the timecard.
customKeys : An array of custom keys.
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=getTimecards&startDate=2017-11-30&endDate=2017-12-01"
Example Response:
[ { "ID": 1234, "date": "2017-11-30", "userID": 123, "username": "john.doe", "user_full_name": "John Doe", "start_time": "09:00:00", "end_time": "17:00:00", "hrs": "8.00", "break_hrs": "0.00", "total_hrs": "8.00", "ot": "0.00", "dt": "0.00", "jobID": 0, "jobnumber": null, "jobname": null, "taskTypeID": 18, "taskType": "EDIT", "taskID": 0, "locationID": 2, "location": "Los Angeles", "description": "", "submittedID": 0, "submittee": null, "submittedTime": null, "approverID": 0, "approver": null, "approvalTime": null, "disputedID": 0, "disputer": null, "disputedTime": null, "disputedNote": "", "status": "NOT SUBMITTED", "customKeys": [] } ]
Add Timecards¶
GET
/nimAPI.php?q=addTimecard
¶Adds a new timecard.
Note
A user can be passed by either username or userID. If both are passed the userID will be used.
A task type 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 task’s values will override userID, jobID, and taskTypeID.
PARAMETERS¶ date
date
REQUIRED
The date of the timecard
Format: YYYY-MM-DD
userID
integer
OPTIONAL
The ID of the user to associate with the timecard.
username
string
OPTIONAL
The username of the user to associate with the timecard.
jobID
integer
OPTIONAL
The ID of the job to associate with the timecard.
taskTypeID
integer
OPTIONAL
The ID of the task type to associate with the timecard.
taskType
string
OPTIONAL
The name of the task type to associate with the timecard.
taskID
integer
OPTIONAL
The ID of the task to associate with the timecard.
If provided, overrides userID, jobID, and taskTypeID with values from the task.
startTime
string
OPTIONAL
The start time of the timecard
Range: 00:00:00 to 23:59:59
endTime
string
OPTIONAL
The end time of the timecard
Range: 00:00:00 to 23:59:59
hrs
decimal
OPTIONAL
The total hours worked, including break hours, overtime, and double time
Maximum value: 24
breakHrs
decimal
OPTIONAL
The break hours
Value must be less than hrs.
ot
decimal
OPTIONAL
The overtime hours
Value must be less than hrs - breakHrs.
The default label in the UI for this field is Overtime 1. The label can be changed in the UI.
dt
decimal
OPTIONAL
The double time hours
Value must be less than hrs - (breakHrs + ot).
The default label in the UI for this field is Overtime 2. The label can be changed in the UI.
locationID
integer
OPTIONAL
The ID of the location to associate with the timecard.
location
string
OPTIONAL
The name of the location to associate with the timecard.
description
string
OPTIONAL
The description of the work done.
customKeys
dictionary
OPTIONAL
A dictionary of custom keys
Format: {“Custom Key Name” : “Value”}
RETURN¶ ID
string
The ID of the newly created timecard.
success
boolean
Indicates whether the operation was successful.
error
string
Contains any error messages if success is false.
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=addTimecard&date=2017-11-30&userID=123&startTime=09:00:00&endTime=17:00:00&hrs=8.00"
Example Response:
{ "ID": "1234", "success": true, "error": "" }
Update Timecard¶
GET
/nimAPI.php?q=updateTimecard
¶Updates an existing timecard.
Note
A user can be passed by either username or userID. If both are passed the userID will be used.
A task type 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 task’s values will override userID, jobID, and taskTypeID.
PARAMETERS¶ timecardID
integer
REQUIRED
The ID of the timecard to update.
date
date
OPTIONAL
The date of the timecard
Format: YYYY-MM-DD
userID
integer
OPTIONAL
The ID of the user to associate with the timecard.
username
string
OPTIONAL
The username of the user to associate with the timecard.
jobID
integer
OPTIONAL
The ID of the job to associate with the timecard.
taskTypeID
integer
OPTIONAL
The ID of the task type to associate with the timecard.
taskType
string
OPTIONAL
The name of the task type to associate with the timecard.
taskID
integer
OPTIONAL
The ID of the task to associate with the timecard.
If provided, overrides userID, jobID, and taskTypeID with values from the task.
startTime
string
OPTIONAL
The start time of the timecard
Range: 00:00:00 to 23:59:59
endTime
string
OPTIONAL
The end time of the timecard
Range: 00:00:00 to 23:59:59
hrs
decimal
OPTIONAL
The total hours worked, including break hours, overtime, and double time
Maximum value: 24
breakHrs
decimal
OPTIONAL
The break hours
Value must be less than hrs.
ot
decimal
OPTIONAL
The overtime hours
Value must be less than hrs - breakHrs.
The default label in the UI for this field is Overtime 1. The label can be changed in the UI.
dt
decimal
OPTIONAL
The double time hours
Value must be less than hrs - (breakHrs + ot).
The default label in the UI for this field is Overtime 2. The label can be changed in the UI.
locationID
integer
OPTIONAL
The ID of the location to associate with the timecard.
location
string
OPTIONAL
The name of the location to associate with the timecard.
description
string
OPTIONAL
The description of the work done.
customKeys
dictionary
OPTIONAL
A dictionary of custom keys
Format: {“Custom Key Name” : “Value”}
RETURN¶ ID
string
The ID of the updated timecard.
success
boolean
Indicates whether the operation was successful.
error
string
Contains any error messages if success is false.
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=updateTimecard&timecardID=1234&date=2017-11-30&userID=123&startTime=09:00:00&endTime=17:00:00&hrs=8.00"
Example Response:
{ "ID": "1234", "success": true, "error": "" }
Delete Timecard¶
GET
/nimAPI.php?q=deleteTimecard
¶Deletes an existing timecard.
PARAMETERS¶ timecardID
integer
REQUIRED
The ID of the timecard to delete.
RETURN¶ success
boolean
Indicates whether the operation was successful.
error
string
Contains any error messages if success is false.
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=deleteTimecard&timecardID=1234"
Example Response:
{ "success": true, "error": "" }
Get Timecard Info¶
GET
/nimAPI.php?q=getTimecardInfo
¶Retrieves information for an existing timecard.
PARAMETERS¶ timecardID
integer
REQUIRED
The ID of the timecard to retrieve.
RETURN¶ ID
integer
The ID of the timecard.
date
date
The date of the timecard.
userID
integer
The ID of the user associated with the timecard.
username
string
The username of the user associated with the timecard.
user_full_name
string
The full name of the user associated with the timecard.
start_time
string
The start time of the timecard.
end_time
string
The end time of the timecard.
hrs
decimal
The total hours worked.
break_hrs
decimal
The break hours.
total_hrs
decimal
The total hours including breaks.
ot
decimal
The overtime hours.
The default label in the UI for this field is Overtime 1. The label can be changed in the UI.
dt
decimal
The double time hours.
The default label in the UI for this field is Overtime 2. The label can be changed in the UI.
jobID
integer
The ID of the job associated with the timecard.
jobnumber
string
The job number associated with the timecard.
jobname
string
The job name associated with the timecard.
taskTypeID
integer
The ID of the task type associated with the timecard.
taskType
string
The name of the task type associated with the timecard.
taskID
integer
The ID of the task associated with the timecard.
locationID
integer
The ID of the location associated with the timecard.
location
string
The name of the location associated with the timecard.
description
string
The description of the work done.
submittedID
integer
The ID of the person who the timecard was submitted to.
submittedTime
datetime
The datetime the timecard was submitted.
approverID
integer
The ID of the person who approved the timecard.
approvalTime
datetime
The datetime the timecard was approved.
disputedID
integer
The ID of the person who disputed the timecard.
disputedTime
datetime
The datetime the timecard was disputed.
disputedNote
string
The note explaining the dispute.
approver
string
The name of the person who approved the timecard.
submittee
string
The name of the person who submitted the timecard.
disputer
string
The name of the person who disputed the timecard.
status
string
The status of the timecard.
customKeys
array
An array of custom keys.
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=getTimecardInfo&timecardID=1"
Example Response:
{ "ID": 1, "date": "2008-01-03", "userID": 1, "username": "john.doe", "user_full_name": "John Doe", "start_time": "09:00:00", "end_time": "19:00:00", "hrs": "10.00", "break_hrs": "0.00", "total_hrs": "10.00", "ot": "0.00", "dt": "0.00", "jobID": null, "jobnumber": null, "jobname": null, "taskTypeID": null, "taskType": null, "taskID": 0, "locationID": null, "location": null, "description": null, "submittedID": 0, "submittedTime": null, "approverID": 0, "approvalTime": null, "disputedID": 0, "disputedTime": null, "disputedNote": "", "approver": null, "submittee": null, "disputer": null, "status": "NOT SUBMITTED", "customKeys": [] }
Exchange Rates¶
Get Exchange Rates¶
GET
/nimAPI.php?q=getExchangeRates
¶Get Exchange Rates based on the row ID or the date.
PARAMETERS¶ ID
integer
OPTIONAL
The ID of the exchange rate row.
Required if date is not provided. If both ID and date are provided, the ID will be used.
date
date
OPTIONAL
Will return the exchange rate used for the date. The date does not have to be the exact date of the row. The exchange rate row selected will be the closest date before or equal to the date entered.
Format: YYYY-MM-DD
Required if ID is not provided. If both ID and date are provided, the ID will be used.
RETURN¶ success
boolean
Indicates whether the operation was successful.
Possible values: true or false.
error
string
Contains any error messages if success is false.
If success is true, this field is typically an empty string.
data
array
An array of objects. Each object includes:
ID : The unique identifier for the exchange rate row.
date : The date of the exchange rate.
exchange rate : The exchange rate for each currency is represented as a key/value pair with the currency code as the key and the exchange rate as the value. (e.g, “USD”: “1.000000”, “EUR”: “0.824160”, etc.)
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=getExchangeRates&date=2023-01-01"
Example Response:
{ "success": true, "error": "", "data": [ { "ID": 5, "date": "2021-01-01", "USD": "1.000000", "EUR": "0.824160", "JPY": "103.599220", "GBP": "0.731370", "AUD": "1.299900", "CHF": "0.890000", "CAD": "1.274000", "MXN": "19.882200", "CNY": null, "NZD": null, "SEK": null, "RUB": null, "HKD": null, "NOK": null, "SGD": null, "TRY": null, "KRW": null, "ZAR": null, "BRL": null, "INR": null, "ARS": null, "BGN": null, "CZK": null, "DKK": null, "HRK": null, "HUF": null } ] }
Add Exchange Rates¶
GET
/nimAPI.php?q=addExchangeRates
¶Creates a new exchange rate entry.
PARAMETERS¶ date
date
REQUIRED
The date of the exchange rate. This exchange rate will be used for all items that fall on or after this date until the next exchange rate date is passed.
Format: YYYY-MM-DD
USD
float
OPTIONAL
The exchange rate for USD.
EUR
float
OPTIONAL
The exchange rate for EUR.
JPY
float
OPTIONAL
The exchange rate for JPY.
GBP
float
OPTIONAL
The exchange rate for GBP.
AUD
float
OPTIONAL
The exchange rate for AUD.
CHF
float
OPTIONAL
The exchange rate for CHF.
CAD
float
OPTIONAL
The exchange rate for CAD.
MXN
float
OPTIONAL
The exchange rate for MXN.
CNY
float
OPTIONAL
The exchange rate for CNY.
NZD
float
OPTIONAL
The exchange rate for NZD.
SEK
float
OPTIONAL
The exchange rate for SEK.
RUB
float
OPTIONAL
The exchange rate for RUB.
HKD
float
OPTIONAL
The exchange rate for HKD.
NOK
float
OPTIONAL
The exchange rate for NOK.
SGD
float
OPTIONAL
The exchange rate for SGD.
TRY
float
OPTIONAL
The exchange rate for TRY.
KRW
float
OPTIONAL
The exchange rate for KRW.
ZAR
float
OPTIONAL
The exchange rate for ZAR.
BRL
float
OPTIONAL
The exchange rate for BRL.
INR
float
OPTIONAL
The exchange rate for INR.
ARS
float
OPTIONAL
The exchange rate for ARS.
BGN
float
OPTIONAL
The exchange rate for BGN.
CZK
float
OPTIONAL
The exchange rate for CZK.
DKK
float
OPTIONAL
The exchange rate for DKK.
HRK
float
OPTIONAL
The exchange rate for HRK.
HUF
float
OPTIONAL
The exchange rate for HUF.
RETURN¶ success
boolean
Indicates whether the operation was successful.
Possible values: true or false.
error
string
Contains any error messages if success is false.
If success is true, this field is typically an empty string.
ID
integer
The ID of the newly created item.
Example Request:
curl "http://hostname:portnumber/nimAPI.php?q=addExchangeRates&date=2023-01-01&USD=1.0&EUR=0.85&JPY=110.0"
Example Response:
{ "ID": 62, "success": true, "error": "" }
Update Exchange Rates¶
GET
/nimAPI.php?q=updateExchangeRates
¶Updates existing exchange rates based on the provided ID.
PARAMETERS¶ ID
integer
REQUIRED
The ID of the exchange rate row to update.
date
date
OPTIONAL
The date to use for the exchange rate row.
Format: YYYY-MM-DD
USD
float
OPTIONAL
The exchange rate for USD.
Setting this value to 0 will remove the exchange rate for USD.
EUR
float
OPTIONAL
The exchange rate for EUR.
Setting this value to 0 will remove the exchange rate for EUR.
JPY
float
OPTIONAL
The exchange rate for JPY.
Setting this value to 0 will remove the exchange rate for JPY.
GBP
float
OPTIONAL
The exchange rate for GBP.
Setting this value to 0 will remove the exchange rate for GBP.
AUD
float
OPTIONAL
The exchange rate for AUD.
Setting this value to 0 will remove the exchange rate for AUD.
CHF
float
OPTIONAL
The exchange rate for CHF.
Setting this value to 0 will remove the exchange rate for CHF.
CAD
float
OPTIONAL
The exchange rate for CAD.
Setting this value to 0 will remove the exchange rate for CAD.
MXN
float
OPTIONAL
The exchange rate for MXN.
Setting this value to 0 will remove the exchange rate for MXN.
CNY
float
OPTIONAL
The exchange rate for CNY.
Setting this value to 0 will remove the exchange rate for CNY.
NZD
float
OPTIONAL
The exchange rate for NZD.
Setting this value to 0 will remove the exchange rate for NZD.
SEK
float
OPTIONAL
The exchange rate for SEK.
Setting this value to 0 will remove the exchange rate for SEK.
RUB
float
OPTIONAL
The exchange rate for RUB.
Setting this value to 0 will remove the exchange rate for RUB.
HKD
float
OPTIONAL
The exchange rate for HKD.
Setting this value to 0 will remove the exchange rate for HKD.
NOK
float
OPTIONAL
The exchange rate for NOK.
Setting this value to 0 will remove the exchange rate for NOK.
SGD
float
OPTIONAL
The exchange rate for SGD.
Setting this value to 0 will remove the exchange rate for SGD.
TRY
float
OPTIONAL
The exchange rate for TRY.
Setting this value to 0 will remove the exchange rate for TRY.
KRW
float
OPTIONAL
The exchange rate for KRW.
Setting this value to 0 will remove the exchange rate for KRW.
ZAR
float
OPTIONAL
The exchange rate for ZAR.
Setting this value to 0 will remove the exchange rate for ZAR.
BRL
float
OPTIONAL
The exchange rate for BRL.
Setting this value to 0 will remove the exchange rate for BRL.
INR
float
OPTIONAL
The exchange rate for INR.
Setting this value to 0 will remove the exchange rate for INR.
ARS
float
OPTIONAL
The exchange rate for ARS.
Setting this value to 0 will remove the exchange rate for ARS.
BGN
float
OPTIONAL
The exchange rate for BGN.
Setting this value to 0 will remove the exchange rate for BGN.
CZK
float
OPTIONAL
The exchange rate for CZK.
Setting this value to 0 will remove the exchange rate for CZK.
DKK
float
OPTIONAL
The exchange rate for DKK.
Setting this value to 0 will remove the exchange rate for DKK.
HRK
float
OPTIONAL
The exchange rate for HRK.
Setting this value to 0 will remove the exchange rate for HRK.
HUF
float
OPTIONAL
The exchange rate for HUF.
Setting this value to 0 will remove the exchange rate for HUF.
RETURN¶ success
boolean
Indicates whether the operation was successful.
Possible values: true or false.
error
string
Contains any 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=updateExchangeRates&ID=62&EUR=0.85&JPY=110.0"
Example Response:
{ "success": true, "error": "" }
Delete Exchange Rates¶
GET
/nimAPI.php?q=deleteExchangeRates
¶Deletes an existing exchange rate row based on the provided parameters.
PARAMETERS¶ ID
integer
OPTIONAL
The ID of the exchange rate row to delete.
Required if date is not provided. If both ID and date are provided, the ID will be used.
date
date
OPTIONAL
Selects the exchange rate row to delete based on the row used for the date. The date does not have to be the exact date of the row. The exchange rate row deleted will have the closest date before or equal to the date entered.
Format: YYYY-MM-DD
Required if ID is not provided. If both ID and date are provided, the ID will be used.
RETURN¶ success
boolean
Indicates whether the operation was successful.
Possible values: true or false.
error
string
Contains any 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=deleteExchangeRates&ID=8978"
Example Response:
{ "success": true, "error": "" }