Skip to main content
Call these from a server script, such as exports['redutzu-mdt']:Open(source). Most exports take an optional source as their last argument:
  • With source, the export acts as that officer. It checks their permissions and department access like the MDT does, and logs them as the author.
  • Without source, it runs as an automated action with no checks.
Exports that change data return ok (or the new id), then an errKey translation key and its params when they fail.
Some exports have their own page: RegisterHook and RemoveHook, and CanAccessRecord.

MDT

Open

Open the MDT for a player from the server.

GetRegisteredPages

List the custom pages registered with RegisterPage.

Officers

GetOfficer

Get a connected officer.

GetOfficerList

List connected officers.

GetOfficerCount

Count connected officers.

IsOfficerOnDuty

Check whether an officer is on duty.

SetOfficerDuty

Put an officer on or off duty.

SetOfficerStatus

Change an officer’s status.

GetNextCallsign

Get the first free callsign for a rank. It follows the rank’s format from Config.Callsign.Rules, or <grade>-### when no rule covers it.

Units

GetUnits

List a department’s units. Permanent units come first, then by name.

GetUnit

Get a unit.

GetOfficerUnit

Get the unit an officer is in.

SetUnitStatus

Change a unit’s status, and every on-duty member’s with it.

Employees

SearchEmployees

Get one page of a department’s employees, the same list the Employees page shows.

GetEmployee

Get an employee’s full profile, as shown on the Overview tab.

GetLeaderboard

Rank a department by hours on duty, highest first. Returns up to 50 employees.

GetEmployeeShifts

Get the shifts an employee started in a time range, newest first.

GetEmployeeRecords

Get the incidents, evidence, warrants and BOLOs an employee filed or was listed on in a time range, newest first.

GetEmployeeRankHistory

Get an employee’s hires, promotions and demotions, oldest first.

RecruitEmployee

Hire an online, unemployed citizen into a department.

SetEmployeeGrade

Promote or demote an employee within their department.

SetEmployeeCallsign

Change an employee’s callsign.

SetEmployeeBadge

Change an employee’s badge number. Badge numbers are unique within a department.

FireEmployee

Fire an employee. They’re moved to the unemployed job.

Strikes

GetEmployeeStrikes

Get an employee’s strikes in their current department, newest first.

GetStrike

Get one strike.

AddStrike

Give an employee a strike. They get a notification.

RemoveStrike

Remove a strike.

Reviews

GetEmployeeReviews

Get the reviews written about an employee, newest first. Returns up to 100.

GetReview

Get one review.

CreateReview

Write a review about an employee.

UpdateReview

Edit a review. Fields you leave out keep their value.

DeleteReview

Delete a review.

HR notes

GetEmployeeHRNotes

Get an employee’s HR notes with their follow-ups, newest first. Returns up to 100.

GetHRNote

Get one HR note with its follow-ups.

CreateHRNote

Add an HR note to an employee.

UpdateHRNote

Edit an HR note or change its status. Fields you leave out keep their value.

DeleteHRNote

Delete an HR note and its follow-ups.

Certifications

GetCertificationTypes

List a department’s certification types.

GetCertificationType

Get one certification type.

CreateCertificationType

Create a certification type.

UpdateCertificationType

Edit a certification type.

DeleteCertificationType

Delete a certification type. Every employee holding it loses it.

GetEmployeeCertifications

Get the certifications an employee holds, in the order they got them.

GrantCertification

Give an employee a certification. Granting one they already hold still succeeds.

RevokeCertification

Take a certification from an employee.

Achievements

GetAchievements

List a department’s achievements.

GetAchievement

Get one achievement.

CreateAchievement

Create an achievement.

UpdateAchievement

Edit an achievement.

DeleteAchievement

Delete an achievement.

Department

HasAccess

Check whether a player can use the MDT, and optionally whether they have a permission.

GetJobPermissions

Get a department’s permissions, grouped by the grade that unlocks them.

SetPermissionRank

Set the lowest grade that unlocks one or more permissions, or take them away from every grade.

ReloadPermissions

Read config/permissions.json again and refresh every client. Use it after editing the file by hand.

AdjustSocietyFunds

Move money between an officer and their department’s society account.

GetOperationsAnalytics

Get the stats shown on Management for a department and time range: records, charges, shifts and finances.

SetAdminSetting

Change a setting from the admin panel.

ResetAdminSetting

Reset an admin panel setting to its value in the config files.

Dispatch

CreateDispatchCall

Send a dispatch call to officers, from a robbery script or any other resource.

GetDispatchCall

Get an open call.

GetDispatchCalls

List open calls.

AttachUnitToDispatchCall

Attach a callsign to a call.

DetachUnitFromDispatchCall

Remove a callsign from a call.

AcknowledgeDispatchCall

Mark a call as seen by an officer. Calling it again removes the mark.

AddDispatchCallNote

Add a note to a call’s timeline.

BumpDispatchCallPriority

Raise a call’s priority one step. A high call stays high.

ResolveDispatchCall

Close a call and move it to the history.

GetDispatchAnalytics

Get the dispatch stats shown on Management: calls taken, response times and work per officer and unit.

Radio codes

GetRadioCodes

List every radio code, in the order shown in the MDT.

GetRadioCode

Get one radio code.

CreateRadioCode

Add a radio code to the end of the list.

UpdateRadioCode

Edit a radio code.

DeleteRadioCode

Delete a radio code.

Notifications

SendNotification

Send a notification to one or more officers. It shows in their MDT notification list.

Chat

SendChatMessage

Post a text message as an officer.

SendChatLocation

Post a map location as an officer.

SendChatImage

Post an image that’s already hosted.

ShareChatRecord

Post a card that links to a record, such as a citizen or an incident.

PostChatSystemMessage

Post a message from the system instead of an officer.

EditChatMessage

Change the text of a message.

DeleteChatMessage

Delete a message.

UpdateChatLocation

Move a location message, or stop a live share.

ReactChatMessage

Add an emoji reaction as an officer. Calling it again with the same emoji removes it.

CreateChatPoll

Post a poll as an officer.

VoteChatPoll

Vote in a poll as an officer. Voting for the same option again removes the vote.

PinChatMessage

Pin a message to the top of its channel. With source, the officer needs chat.pin.

UnpinChatMessage

Unpin a message. With source, the officer needs chat.pin.

GetChatPinnedMessages

Get the pinned messages of a channel.

MarkChatRead

Mark a channel as read for an officer.

MarkChatUnread

Mark a channel unread for an officer, starting at a message.

GetChatUnread

Get an officer’s unread counts.

GetChatChannel

Get a channel or a DM.

GetChatMessages

Get one page of a channel’s messages, oldest first.

GetChatMessage

Get one message.

OpenChatDm

Open a direct message with another officer, creating it if needed.

GetChatDms

List an officer’s DMs.

IsChatMessageAuthor

Check whether an officer wrote a message.

Collaboration

IsCollabEnabled

Check whether collaboration is turned on.

CreateCollabRoom

Create a room. With source, that officer owns it.

GetCollabRoom

Get a room.

GetCollabRooms

List the rooms an officer can see.

JoinCollabRoom

Add an officer to a room.

LeaveCollabRoom

Remove an officer from a room.

InviteCollabMember

Invite an officer to a room. Unanswered invites expire after Config.Collaboration.Invites.Expiry seconds.

KickCollabMember

Remove a member, and optionally ban them from rejoining.

TransferCollabOwnership

Give a room to another member.

CloseCollabRoom

Close a room for everyone.

IsCollabMember

Check whether an officer is in a room.

IsCollabRoomOwner

Check whether an officer owns a room.

Citizens

SearchCitizens

Get one page of citizens, the same list the Citizens page shows.

GetCitizen

Get a citizen’s profile with everything on their page.

UpdateCitizen

Change a citizen’s photo or profile fields.

RegisterCitizen

Create or update a citizen’s profile, for servers that don’t fill it from the framework.

GetCitizenAlerts

Get a citizen’s active warrants and BOLOs, license state and tags, such as for an ID check.

GetLicensePoints

Get a citizen’s license points.

AddLicensePoints

Add or remove license points. Reaching the threshold suspends the license.

IssuePenalty

Charge a citizen with penal articles: fines, jail, community service and points.

Prisoners

GetPrisoners

List everyone serving a sentence.

GetCitizenPrisonStatus

Check whether a citizen is in jail, and their remaining time.

GetCitizenPrisonHistory

Get a citizen’s sentences, newest first.

ReleasePrisoner

Release a prisoner early.

SetPrisonerSentence

Change a prisoner’s remaining time.

Vehicles

SearchVehicles

Get one page of vehicles, the same list the Vehicles page shows.

GetVehicle

Get a vehicle with everything on its page.

UpdateVehicle

Change a vehicle’s status, photo or registration fields.

RegisterVehicle

Create or update a vehicle record, for servers that don’t fill it from the framework.

GetVehicleModifications

List a vehicle’s recorded modifications.

AddVehicleModification

Record a modification on a vehicle.

RemoveVehicleModification

Remove a recorded modification.

Properties

SearchProperties

Get one page of properties, the same list the Properties page shows.

GetProperty

Get a property with everything on its page.

Weapons

SearchWeapons

Get one page of weapons, the same list the Weapons page shows.

GetWeapon

Get a weapon with everything on its page.

CreateWeapon

Register a weapon. Without a serial, one is generated.

UpdateWeapon

Change a weapon’s status.

GenerateWeaponSerialNumber

Generate a free weapon serial number.

Penal code

GetPenalCode

Get the full penal code, with its categories and articles.

GetPenalCategory

Get a penal code category with its articles.

UpdatePenalCategory

Edit a penal code category.

DeletePenalCategory

Delete a penal code category. It must have no articles.

GetPenalArticle

Get one penal code article.

UpdatePenalArticle

Edit a penal code article.

DeletePenalArticle

Delete a penal code article.

Incidents

SearchIncidents

Get one page of incidents, the same list the Incidents page shows.

GetIncident

Get an incident with everything on its page.

CreateIncident

Create an incident with its people, vehicles, weapons, evidence and charges.

UpdateIncident

Change an incident’s status or description.

DeleteIncident

Delete an incident.

Warrants

SearchWarrants

Get one page of warrants, the same list the Warrants page shows.

GetWarrant

Get a warrant with everything on its page.

CreateWarrant

Create a search or arrest warrant.

UpdateWarrant

Change a warrant’s reason or status. A served warrant’s reason can’t change.

ServeWarrant

Mark a warrant as served.

DeleteWarrant

Delete a warrant.

Operation plans

GetOperationPlans

List operation plans.

GetOperationPlan

Get one operation plan.

CreateOperationPlan

Create an operation plan, optionally linked to a warrant.

UpdateOperationPlan

Edit an operation plan. Fields you leave out keep their value.

DeleteOperationPlan

Delete an operation plan.

SetOperationPlanMission

Start or end an operation plan’s mission.

AcknowledgeOperationPlan

Mark an operation plan as read by an officer.

BOLOs

SearchBolos

Get one page of BOLOs, the same list the BOLOs page shows.

GetBolo

Get a BOLO with everything on its page.

CreateBolo

Create a BOLO. It needs at least one citizen or vehicle.

UpdateBolo

Change a BOLO’s status.

AttachBoloSubject

Add a citizen or vehicle to a BOLO.

DetachBoloSubject

Remove a citizen or vehicle from a BOLO.

MarkBoloLocated

Mark a BOLO as located.

DeleteBolo

Delete a BOLO.

Evidence

SearchEvidences

Get one page of evidence, the same list the Evidence page shows.

GetEvidence

Get an evidence record with everything on its page.

CreateEvidence

Log a new evidence record with its people, vehicles, weapons, reports, tags and photos.

UpdateEvidence

Change an evidence record’s status or description. Fields you leave out keep their value.

DeleteEvidence

Permanently delete an evidence record with its links, tags, photos, notes, analyses and activity log. This can’t be undone.

TransferEvidenceCustody

Check evidence out to an officer, or return it to storage. Every transfer is written to the record’s activity log.

RequestEvidenceAnalysis

Ask the lab to analyze evidence, such as for fingerprints, DNA or ballistics.

CompleteEvidenceAnalysis

Record the result of a pending analysis. A result can only be recorded once.

GetEvidenceAnalysis

Get one analysis.

Tags

GetTags

List every tag.

GetTag

Get one tag.

CreateTag

Create a tag.

UpdateTag

Edit a tag.

DeleteTag

Delete a tag and remove it from every record.

GetEntityTags

Get the tags on a record.

AddEntityTag

Add a tag to a record. A record holds up to Config.MaxTags tags.

RemoveEntityTag

Remove a tag from a record.

Notes and images

GetEntityNotes

Get a record’s notes.

AddEntityNote

Add a note to a record.

RemoveEntityNote

Remove a note from a record.

GetEntityImages

Get a record’s images.

AddEntityImage

Add an image that’s already hosted to a record.

RemoveEntityImage

Remove an image from a record.

Record access

SetRecordAccess

Change which departments can see a record.
Get the graph of records linked to a record, as shown on its Links tab.

Logs

GetActionLog

Get one page of the action log shown on Logs.

LogAction

Write an entry to the action log.

GetActivityLog

Get a record’s activity log.

LogActivity

Add an entry to a record’s activity log.

Cameras

GetCameras

List every camera.

GetCamera

Get one camera.

RepairCamera

Bring a camera back online, however it went down. Use it for your own repair job or minigame instead of the built-in repair kit.

SetOfficerBodycam

Turn an officer’s bodycam on or off. Officers watching it are disconnected when it goes off.

IsBodycamEnabled

Check whether an officer’s bodycam is on.

SetDashcam

Turn the dashcam of the vehicle an officer is in on or off.

IsDashcamEnabled

Check whether the vehicle an officer is in has its dashcam on.

Radar

GetPlateAlert

Check whether a plate, or its owner, is wanted. This only reads and doesn’t notify anyone.

ReportPlateScan

Report a plate an officer’s radar or ALPR just read. When it’s flagged, the officer gets an alert. A high enough priority also creates a dispatch call.

Suspects and props

ToggleSuspectCuff

Cuff or uncuff a player through your configured Config.Police.Provider. Uncuffing also releases an escort or carry.

GetOfficerProps

List the officer props placed right now, such as cones and barriers.