Important

   

Starting from version 8.9.03, BMC Network Automation is renamed to TrueSight Network Automation. This space contains information about TrueSight Network Automation 8.9.03 and the later service packs for 8.9. For earlier releases, see BMC Network Automation 8.9.

Remote File Servers API

TrueSight Network Automation REST API – Version 3.0 – Remote File Servers
The base URL for the API is:

https://serverName:portNumber/bca-networks/api


GET /v3.0/remote_file_servers
 Retrieves remote file servers, matching any filter criteria
Parameters

Name

Located in

Description

Default

Schema

filter.name

query

Filter for remote file servers matching this name, asterisk wildcards allowed

string

orderBy

query

Sort by the specified attribute (name, address, ftpUsername, scpUsername, or a listable dynamic field name) in the specified order (prefix with a '+' for ascending or a '-' for descending)

"+name"

string
Enum: [
  "+name",
  "-name",
  "+address",
  "-address",
  "+ftpTransferUsername",
  "-ftpTransferUsername",
  "+scpTransferUsername",
  "-scpTransferUsername"
]

offset

query

Return the specified page number

1

integer

limit

query

Define the number of rows in a page or the maximum number of remote file servers to return

25

integer

Authorization

header

Authorization token formatted as 'Bearer [token]'

string*

Responses

Code

Description

Schema

200

successful operation

[
   #RemoteFileServerDTO
]

401

Unauthorized: Failed to provide a suitable Authorization header or the specified user is not logged in

403

Forbidden: Not allowed to access remote file servers

500

Internal server error: Unexpected exception occurred

POST /v3.0/remote_file_servers
 Adds a new remote file server
Parameters

Name

Located in

Description

Default

Schema

body

body

Complete attributes of the new remote file server

#RemoteFileServerDTO

Authorization

header

Authorization token formatted as 'Bearer [token]'

string*

Responses

Code

Description

Schema

201

Created: New remote file server successfully added

400

Bad request: Input remote file server DTO is missing or new remote file server is invalid

401

Unauthorized: Failed to provide a suitable Authorization header or the specified user is not logged in

403

Forbidden: Not allowed to add a new remote file server

500

Internal server error: Unexpected exception occurred

GET /v3.0/remote_file_servers/{nameOrKey}
 Retrieves one remote file server either by name or by database key
Parameters

Name

Located in

Description

Default

Schema

nameOrKey

path

Name or database key of the remote file server of interest

string*

Authorization

header

Authorization token formatted as 'Bearer [token]'

string*

Responses

Code

Description

Schema

200

successful operation

#RemoteFileServerDTO

401

Unauthorized: Failed to provide a suitable Authorization header or the specified user is not logged in

403

Forbidden: Not allowed to access remote file servers

404

Not found: No single matching remote file server found

500

Internal server error: Unexpected exception occurred

PUT /v3.0/remote_file_servers/{nameOrKey}
 Modifies all attributes of an existing remote file server
Parameters

Name

Located in

Description

Default

Schema

nameOrKey

path

Name or database key of the remote file server to be modified

string*

body

body

Complete new attribute values for the remote file server; anything left out will be considered to be null and will be nulled out in the remote file server

#RemoteFileServerDTO

Authorization

header

Authorization token formatted as 'Bearer [token]'

string*

Responses

Code

Description

Schema

200

successful operation

#RemoteFileServerDTO

400

Bad request: Input remote file server DTO is missing or modified remote file server is invalid

401

Unauthorized: Failed to provide a suitable Authorization header or the specified user is not logged in

403

Forbidden: Not allowed to modify the remote file server

404

Not found: No single matching remote file server found

500

Internal server error: Unexpected exception occurred

DELETE /v3.0/remote_file_servers/{nameOrKey}
 Deletes an unreferenced remote file server
Parameters

Name

Located in

Description

Default

Schema

nameOrKey

path

Name or database key of the remote file server to be deleted

string*

Authorization

header

Authorization token formatted as 'Bearer [token]'

string*

Responses

Code

Description

Schema

200

successful operation

string

400

Bad request: Remote file server is currently in use by a device or device import task

401

Unauthorized: Failed to provide a suitable Authorization header or the specified user is not logged in

403

Forbidden: Not allowed to delete the remote file server

404

Not found: No single matching remote file server found

500

Internal server error: Unexpected exception occurred

PATCH /v3.0/remote_file_servers/{nameOrKey}
 Modifies only the specified attributes of an existing remote file server, where the changes are specified in JSON Patch format (per RFC 6902)
Parameters

Name

Located in

Description

Default

Schema

nameOrKey

path

Name or database key of the remote file server to be modified

string*

body

body

New attribute values for the remote file server, in JSON Patch format

#JsonPatch

Authorization

header

Authorization token formatted as 'Bearer [token]'

string*

Responses

Code

Description

Schema

200

successful operation

#RemoteFileServerDTO

400

Bad request: Input JSON patch information is missing or modified remote file server is invalid

401

Unauthorized: Failed to provide a suitable Authorization header or the specified user is not logged in

403

Forbidden: Not allowed to modify the remote file server

404

Not found: No single matching remote file server found

500

Internal server error: Unexpected exception occurred


Object Definitions

Object

Schema

DynamicFieldValueDTO

 A dynamic field value

{
    id: string
    The database key of the dynamic field whose value this is (read-only)
 
    name: string
    The name of the dynamic field (read-only)
 
    values: [
      The value(s) for the dynamic field; for a single-value field, only the first entry is relevant; read-only for Auto Derived and Configuration Profiled types
 
      string
    ]
 
    dynamicFieldDetailsLink: string
    Link to get more detailed information about the dynamic field (read-only)
}

JsonPatch

 A list of JSON Patch operations

[
    A list of JSON Patch operations
 
     #JsonPatch.OneOperation
  ]

JsonPatch.OneOperation

JsonPatch.Pointer

 Pointer or path to an element or property

string
  Pointer or path to an element or property

JsonPatch.Add

 Add a value to an object or inserts it into an array. In the case of an array, the value is inserted before the given index. The - character can be used instead of an index to insert at the end of an array. The value can be any JSON value.

{
    op: string*
    Enum: [
      "add"
    ]
    value: any*
    path: #JsonPatch.Pointer *
}

JsonPatch.Remove

 Remove a value from an object or array.

{
    op: string*
    Enum: [
      "remove"
    ]
    path: #JsonPatch.Pointer *
}

JsonPatch.Replace

 Replace an existing value. THe value can be any JSON value.

{
    op: string*
    Enum: [
      "replace"
    ]
    value: any*
    path: #JsonPatch.Pointer *
}

JsonPatch.Move

 Move a value from one location to the other. "path" is the destination.

{
    op: string*
    Enum: [
      "move"
    ]
    path: #JsonPatch.Pointer *
    from: #JsonPatch.Pointer *
}

JsonPatch.Copy

 Copy a value from one location to another. "path" is the destination.

{
    op: string*
    Enum: [
      "copy"
    ]
    path: #JsonPatch.Pointer *
    from: #JsonPatch.Pointer *
}

JsonPatch.Test

 Test that the specified value is set in the document at the specified path. If the test fails, then the patch as a whole is not applied. The Value can be any JSON value.

{
    op: string*
    Enum: [
      "test"
    ]
    value: any*
    path: #JsonPatch.Pointer *
}

RemoteFileServerDTO

 Information about a remote file server, which can serve as an OS image file repository

{
    id: string
    The remote file server's unique database key (read-only)
 
    name: string*
    The remote file server's unique display name
 
    address: string*
    Host name or IP address of the remote file server, as it is known to the devices that will access it
 
    ftpTransferEnabledFlag: boolean
    Whether or not the remote file server supports FTP file transfers and has an FTP server running on it; when true, files can be exchanged between devices and the remote file server using the FTP protocol
 
    ftpTransferHomeDirectory: string
    The FTP user's home directory, where transferred files are placed for certain path-aware devices (such as Cisco Nexus and Juniper WX); stored into the %transferPath% property during OS image snapshot and OS image deploy actions
 
    ftpTransferPassword: string
    The FTP user's password
 
    ftpTransferPasswordEncryptedFlag: boolean
    Whether or not the ftpTransferPassword value is encrypted; when false, ftpTransferPassword is in clear text
 
    ftpTransferUsername: string
    The username to be used when making an FTP connection from a device to this remote file server
 
    ftpUserRestrictedToHomeDirectoryFlag: boolean
    whether or not the FTP server is configured to restrict users to their one specific home or root directory; controls whether or not certain path-aware devices (such as Cisco Nexus and Juniper WX) include a full path in FTP copy commands; if the FTP server is unrestricted, a full path is included to ensure the file is saved to the ftpTransferHomeDirectory (stored into the %transferPath% property); if the FTP server is restricted, no full path appears in FTP commands and the file is saved to the user's default permitted directory
 
    readOnlyFileSystemFlag: boolean
    Whether or not files can be written to this remote file server; when false, you will not be able to make OS image snapshots to this server,but will be able to read image files from it for OS image deploy actions
 
    scpTransferEnabledFlag: boolean
    Whether or not the remote file server supports SCP file transfers and has an SSH/SCP server running on it; when true, files can be exchanged between devices and the remote file server using the SCP protocol
 
    scpTransferPassword: string
    The SCP user's password
 
    scpTransferPasswordEncryptedFlag: boolean
    Whether or not the scpTransferPassword value is encrypted; when false, scpTransferPassword is in clear text
 
    scpTransferUsername: string
    The username to be used when making an SCP connection from a device to this remote file server
 
    tftpTransferEnabledFlag: boolean
    Whether or not the remote file server supports TFTP file transfers and has a TFTP server running on it; when true, files can be exchanged between devices and the remote file server using the TFTP protocol
 
    dynamicFields: [
      The dynamic fields
 
       #DynamicFieldValueDTO
    ]
}

Was this page helpful? Yes No Submitting... Thank you

Comments