# Import IP scopes from a CSV file Imports multiple IP scopes from a CSV file upload. ## Endpoint `POST /dcapi/som/ip-scopes/import` ## Request ### Request URL `https://{serverurl}/dcapi/som/ip-scopes/import` Server URL: [{serverurl}](https://www.manageengine.com/products/desktop-central/help/api/cloud/oauth-authentication-endpoint-domain.html) ### Scope `DesktopCentralCloud.SOM.CREATE` ### Header `Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52` ### Request Parameters #### Request Headers - **Content-Type** `string` — **Mandatory**: `multipart/form-data` - **Accept** `string` — **Mandatory**: `application/importIPScopes.v1+json` #### Request Body `multipart/form-data` - `ipScopeCSVFile` `string` — **Mandatory** A CSV file containing the IP scope details required for bulk import. [Refer](https://www.manageengine.com/sites/meweb/images/desktop-central/help/branchofficeboundaryinfoview-sample-import.csv) to the sample CSV file for the supported format and field values. ### Sample Request ```curl curl --request POST \ --url https://appdomains/dcapi/som/ip-scopes/import \ --header 'Accept: application/importIPScopes.v1+json' \ --header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' \ --header 'Content-Type: multipart/form-data' \ -F 'ipScopeCSVFile=CSV File' ``` ### Sample Request Body Import bulk IP scopes using a CSV file upload. ```text ipScopeCSVFile = CSV File ``` ## Response Parameters ### HTTP 202 Response body: `application/json` - `csvImportInProgress` `boolean` Indicates whether the CSV import process has been accepted and is currently running. #### Sample Response: HTTP 202 IP scope CSV import initiated. ```json { "csvImportInProgress": true } ``` ### HTTP 400 Response body: `application/json` - `statusCode` `string` HTTP status code (400). - `errorCode` `string` API-specific error code identifying the validation failure. - `message` `string` Error message describing the validation failure. #### Sample Response: HTTP 400 Empty or invalid CSV file. ```json { "errorCode": "30047", "message": "No data to import", "statusCode": 400 } ``` ### HTTP 412 Response body: `application/json` - `statusCode` `string` HTTP status code (412). - `errorCode` `string` Precondition failed error code identifying the business logic violation. - `message` `string` Error message describing the precondition failed while processing request. #### Sample Response: HTTP 412 Another import is already running. ```json { "errorCode": "30013", "message": "An import operation is already in progress", "statusCode": 412 } ``` ## Rate Limits **Duration:** 1 minute | **Threshold:** 30 | **Lock period:** 5 minutes Duration - Time window for the threshold. Threshold - Number of API calls allowed within the specified duration. Lock Period - Wait time before consecutive API requests.