REST API FAQs
Answers to common questions about N-able N-central REST APIs.
The supported data format for requests and responses is JSON.
Each endpoint has a specific rate limit applied to it. The rate limitation is applied on concurrent calls per end point. In other words, the limit is on the number of concurrent calls allowed for each endpoint.
The range of allowed concurrent calls is anything between 3 to 50. If a limit is reached a 429 HTTP access code will be returned. The caller is responsible for handling this status code and implement a retry mechanism.
There are methods included that enable the API user to:
- Create a task that runs a script now against a target device
- Get general info about a scheduled taskID, like the associated parentID, Name, Type, customerID, deviceIDs, and whether or not the task is enabled.
-
Get the detailed status of a scheduled taskID for each device associated with that task, like deviceID/name and the status of the task for each device (success, fail, etc.) .
Not yet. This information will become available in future versions of the API Service.
This GET method returns information about the task ID, task name, and status for a device.
No, not at this time. The script or automation must be contained within the script and software repository.
remoteExecutionItemId: The remote execution ID can be found in the scripts and software repository located under the column head called repositoryID.
customerId: The customer ID can be found under the SO > Administration > Customers. Locate the customer ID under the "access code" column.
deviceId: The device ID is not listed in the N-central but you can use the API called /api/devices to list and filter through the device IDs.
This indicates there is a clock drift on the target device. Check the local time on the target device and make sure it is correct.
This is an indication that the “REST API Service” Feature Flag has not been enabled on your N-central server. Please email ncpreview@n-able.com and request the “REST API” feature flag to be enabled for your server.
The only way to revoke an access token or refresh token is to re-generate the JWT (User API Token) in the UI. Re-generating the JWT token will result in the previous JWT token and all access/refresh tokens associated with it to be revoked.
The revocation can take up to 5 mins after the generation of the new token.
Look at the “Repository ID” of the script. If it is a number under 2000, it is considered a “bundled” script that comes by default with N-central. Because the IDs of these scripts are pre-defined and known, for security purposes these scripts cannot be enabled for use through REST APIs. In order to invoke these scripts using REST APIs, clone them and use the new script.
If the “Repository ID” is not a low number and the toggle is disabled, this would be because the current user does not have enough permission to enable that script. A user with higher privilege needs to enable the script for REST API use.
To get the ID of a script/AMP, login to the UI and navigate to Configuration > Scheduled Tasks > Script/Software Repository and fetch the ID from “Repository ID” column. In order to invoke that script with the /scheduled-tasks/direct endpoint , the “Enable API” toggle should be switched to “ON”.
There is no endpoint to fetch the IDs of scripts programmatically. This is intentional and by design to harden the security around the REST API functionality.
At the moment there are no metrics around REST API endpoint usage. There is a way to get information about the usage however: A user that has access to Administration Utilities → View logs can download the api-service.log file and parse the log file for the occurrence of the endpoint in question.
If your N-central instance has been upgraded to 2023.9, the REST API functionality is available as preview. Please email ncpreview@n-able.com to request the "REST API" preview to be made available on the target N-central. If you are on an older version of N-central and would like to try out this functionality, please reach out to headnerds@n-able.com for access to a test environment.
If you require assistance or have a technical issue, contact Technical Support using N-able's N-ableMe at https://me.n-able.com/ and click Support from the top menu.
You will need to be logged in to N-ableMe
You can also call at:
-
Americas: 1-855-679-0817
-
EMEA: +44 (0) 1382 309040
-
APAC: +61 (0) 2 8412 4905