Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Explorer

Batch add objects , what is the correct CSV format

Jump to solution

I created a CSV file , the format is below

I then transferred this csv file to the Checkpoint management server, run the batch command,  i got the following errors

Can someone please assist?

Thanks

0 Kudos
2 Solutions

Accepted Solutions
Highlighted
Champion
Champion

Please see How to import multiple objects into R80.x Management database using .csv file for the accepted CSV format.

When you are showing it in a spreadsheet, we do not know what the delimiters are when it is opened in the text editor.

Additionally, if you are creating this file on Windows, it is likely that the EOL (end of line) characters are incorrect.

You can either compensate it by using dos2unix https://bencane.com/2014/02/11/converting-files-from-windows-format-to-unix-format-with-dos2unix/ 

or using something like Notepad++ to save the file in the compatible format.

Regards,

Vladimir

View solution in original post

0 Kudos
Highlighted
Admin
Admin
See the API documentation for add-dns-domain:
https://sc1.checkpoint.com/documents/latest/APIs/index.html#cli/add-dns-domain~v1.6
Specifically look under "Parameter Name" as these what you can use in the first line of the CSV.
Note that you do not need to include all of the parameters, only the required ones along with the ones you wish to set to non-default values.

View solution in original post

0 Kudos
9 Replies
Highlighted
Champion
Champion

Please see How to import multiple objects into R80.x Management database using .csv file for the accepted CSV format.

When you are showing it in a spreadsheet, we do not know what the delimiters are when it is opened in the text editor.

Additionally, if you are creating this file on Windows, it is likely that the EOL (end of line) characters are incorrect.

You can either compensate it by using dos2unix https://bencane.com/2014/02/11/converting-files-from-windows-format-to-unix-format-with-dos2unix/ 

or using something like Notepad++ to save the file in the compatible format.

Regards,

Vladimir

View solution in original post

0 Kudos
Highlighted
Explorer

thank you so much. txt works.

Also, what is the format of the file if I need to batch add networks.

0 Kudos
Highlighted
Admin
Admin

Depends on what parameters you want to set.

In general, the first line is the name of the parameters you want to set, which must match exactly the parameter name in the API documentation.

0 Kudos
Highlighted
Contributor
hello @PhoneBoy do you have excel csv format of dns-domain object (fqdn object), can you please help me on this
0 Kudos
Highlighted
Admin
Admin
See the API documentation for add-dns-domain:
https://sc1.checkpoint.com/documents/latest/APIs/index.html#cli/add-dns-domain~v1.6
Specifically look under "Parameter Name" as these what you can use in the first line of the CSV.
Note that you do not need to include all of the parameters, only the required ones along with the ones you wish to set to non-default values.

View solution in original post

0 Kudos
Highlighted
Contributor
Thanks for the idea. it works
but what about the groups, if we want to assign all the list of domain on the paticular group at the same time via csv format
0 Kudos
Highlighted
Contributor
I didn't find "Parameter Name" for the groups in dns-domain section
0 Kudos
Highlighted
Admin
Admin
That's because the API doesn't support this operation for Domain objects (i.e. adding it to a group on creation).
That will have to be done as a separate API call.
0 Kudos
Highlighted
Explorer

Hi! 

Can you please check what I am doing wrong 

mgmt_cli add dns-domain --batch file

[Expert@smartcenter:0]# cat file
name,is-sub-domain
".example1.com",false
".example2.com",false

I tried to use single quotes, without quotes and nothing is worked for me, I am always receive error 

 Line 2: code: "generic_err_invalid_parameter_name"
message: "Unrecognized parameter [name]"

Line 3: code: "generic_err_invalid_parameter_name"
message: "Unrecognized parameter [name]"

by the way mgmt_cli add dns-domain name ".example1.com" is-sub-domain false, work just fine

 

Any help ? Thanks

0 Kudos