Template Management: Client Connection Test Profile

There are 2 bandwidths on which Arista APIs work- One is Sensor mode and the other one is Client Mode. So there are 3 radio frequencies -2.5 GHZ, 5 GHZ and one which acts on both. So out of these frequencies, one can act as a client, this depends on whichever frequency it gets connected to. So, Client Connectivity Profile helps us to know which frequency bandwidth will act as the client and the related settings to it. It will generate user settings accordingly.

API Calls

/V5/templates/CL_CONN_TEST_PROFILE

/V5/templates/CL_CONN_TEST_PROFILE/{startindex}/{pagesize}

/V5/templates/{templateId}/CL_CONN_TEST_PROFILE

/V5/templates

/V5/templates/copy/{templateId}/CL_CONN_TEST_PROFILE

/V5/templates

/V5/templates/{templateId}/CL_CONN_TEST_PROFILE

Get All Client Connection Test Profiles

Description Fetches the primary information about all client connection test profiles for the specified location.
Who Can Execute? Superuser, Administrator, Operator, and Viewer.
Syntax
GET <Base_URL>/templates/CL_CONN_TEST_PROFILE?locationid=<value>&minimalinforequired=<value>
  • locationid

    Is used to specify location Id for which information is requested. It takes an integer
    value. To retrieve the value for location id refer Location call.

  • minimalinforequired

    Is used to retrieve minimal information. For false all attributes are populated
    else minimal information is retrieved. It takes a boolean value. It is a mandatory attribute.

  • fields

    List of selective fields which will be returned in the response. It takes String value.

  • fetchSubTreeTemplates

    If set to true, templates created above, at and below the given location will be returned. If false, only templates created above and at the given location will be returned. It takes a boolean value.

Sample code
GET https://training.mojonetworks.com/new/webservice/V5/templates/CL_CONN_TEST_PROFILE?locationid=1&minimalinforequired=true
Request Body This API call does not require any request body parameters.
Response Body If the API call is successful, the HTTP response status is 200.
The response body contains the detailed information about all client connection test profiles for the specified location. The response is in the application/JSON format.

Get Paged List Of Client Connection Test Profile

Description This API is used to fetch paged list of templates. It is only applicable for template type CL_CONN_TEST_PROFILE.
Users with the roles can call this API: superuser, administrator, operator, and viewer.
Syntax
GET <Base_URL>/templates/CL_CONN_TEST_PROFILE/{startIndex}/{pageSize}

Here,

  • templateType

    It takes a string value specifying the type of template to be fetched.
    The applicable value is CL_CONN_TEST_PROFILE.

  • startIndex

    It is an integer value indicating the starting index value for the list of templates to be fetched.

  • pageSize

    It is an integer value indicating the ending index for the list of templates to be fetched. Maximum page size is 1000.

Sample code
GET https://training.mojonetworks.com/new/webservice/V5/templates/CL_CONN_TEST_PROFILE
/0/25?locationid=0&nodeid=0
Request Body This API call does not require any request body parameters.
Response Body If the API call is successful, the HTTP response status is 200.
The response body contains primary information of all templates of the specified type
and for the specified location. The response is in the application/JSON format.

Get Details of  a Client Connection Test Profile

Description Fetches the complete details of a client connection test profile.
Who Can Execute? Superuser, Administrator, Operator, and Viewer.
Syntax
GET <Base_URL>/templates/{templateId}/CL_CONN_TEST_PROFILE?locationid=<value>&fields=<value>
  • templateid

    It is Id to identify the template. It takes an integer value.

  • locationid

    Is used to specify location Id for which information is requested.
    It takes an integer value. To retrieve the value for location id refer Location call.

  • fields

    List of selective fields which will be returned in the response. It takes String value.

Sample code
GET https://training.mojonetworks.com/new/webservice/V5/templates/1/CL_CONN_TEST_PROFILE?locationid=1
Request Body This API call does not require any request body parameters.
Response Body If the API call is successful, the HTTP response status is 200.
The response body contains detailed information of the client connection test profile.
The response is in the application/JSON format.

Add a Client Connection Test Profile

Description Adds a template at the specified location.
Who Can Execute? Superuser, Administrator, and Operator.
Syntax
PUT <Base_URL>/templates?locationid=<value>
  • locationid

    It is the parameter that specifies the location at which the template must be added.
    The parameter value is specified in the application/json format. To fetch the appropriate location ID you can use Locations call.

Sample code
PUT  https://training.mojonetworks.com/new/webservice/V5/templates?locationid=1
Request Body This API call requires the details of the Authorized SSID. You must provide the appropriate
values for the following mandatory attributes:

  • type
  • templateName
  • ssid
  • frequencyBand

A sample request body is as follows:

{
        "type": "clientconntestprofile",
        "templateName": "test ssid",
        "ssid": "test ssid",
        "frequencyBand": "BAND_5_GHZ"
}
Response Body If the API call is successful, the HTTP response status is 200.
The response body contains details of the newly created client connection test profile.
The response is in the application/JSON format.

Copy a Client Connection Test Profile

Description Copies a client connection test profile template at the specified location.
Who Can Execute? Superuser, Administrator, and Operator.
Syntax
PUT <Base_URL>/templates/copy/{templateId}/CL_CONN_TEST_PROFILE/?locationid=<value>&nodeId=<value>
  • templateid

    Is the ID of the template. It takes an integer value.

  • locationid

    This takes an integer value specifying the location at which the template exists.
    To retrieve the value for location id refer Location call.

  • nodeid

    This takes an integer value specifying the node in a cluster deployment on which the location exists.

Sample code
PUT  https://training.mojonetworks.com/new/webservice/V5/templates/copy/2/CL_CONN_TEST_PROFILE
Request Body This API call requires the details of the location to which the client connection test profile must be copied.
The destination location information is passed as parameters in the request body.
The parameters are passed in the application/json format. You must provide
appropriate values for the childId JSON attribute in the case of a cluster deployment.
A sample request body is as follows:

{

  "type": "locallocationid",
  "id": 2

}
Response Body If the API call is successful, the HTTP response status is 200.
The response body contains detailed information of the copied client connection test profile.
The response is in the application/JSON format.

Edit a Client Connection Test Profile

Description Modifies the details of the specified client connection test profile template.
Who Can Execute? Superuser, Administrator, and Operator.
Syntax
POST <Base_URL>/templates
Sample code
POST https://training.mojonetworks.com/new/webservice/V5/templates
Request Body This API call requires the details of the client connection test profile to be modified, which is passed as parameters in the request body. The templateId attribute is generated by the system when you add a template. To modify the template, you must provide the same system-generated template ID. You must provide the appropriate values for the following mandatory attributes:

  • type
  • templateName
  • createdAtLocationId
  • templateId
  • ssid
  • frequencyBand

A sample request body is as follows:

{
    "type": "clientconntestprofile",
    "templateId": 2,
    "templateName": "test ssid1",
    "createdAtLocationId": {
        "type": "locallocationid",
        "id": 0
    },
    "ssid": "test ssid",
    "frequencyBand": "BAND_5_GHZ"
}
Response Body If the API call is successful, the HTTP response status is 200.
The response body contains modified client connection test profile details. The response is in the application/JSON format.

Delete a Client Connection Test Profile

Description Deletes the specified client connection test profile template.
Who Can Execute? Superuser, Administrator, and Operator.
Syntax
DELETE <Base_URL>/templates/{templateId}/CL_CONN_TEST_PROFILE?locationid=<value>
  • templateid

    It is id to identify the template. It takes an integer value.

  • locationid

    Is used to specify location Id for which information is requested.
    It takes an integer value. To retrieve the value for location id refer Location call.

Sample code
DELETE  https://training.mojonetworks.com/new/webservice/templates/V5/CL_CONN_TEST_PROFILE?locationid=1
Request Body This API call does not require any request body parameters.
Response Body If the API call is successful, the HTTP response status is 204.
The response body does not contain any other information
JSON Table

Attribute Data Type Description
type String Template type. Expected value is roletemplate.
templateId int System generated value to identify the template.
templateName String Name of the template.
createdAtLocationId application/json ID of location at which the template is created. The value is of the
type Location ID JSON.
description String Description of the template.
templateType String Template type. The applicable value is ROLE_PROFILE
mncTemplateId int System-generated ID of the template provided via the parent server
to the child server.
ssid String The SSID profile
frequencyBand String Frequency band. The possile values are

  • BAND_2_4_GHZ
  • BAND_5_GHZ
  • ANY
securityMode
securityType
username
password
passphrase
pingDestinationServers
wanTestUrl
pingTestEnabled
mnctemplate

Sample JSON
{
        "templateList":[{
                "type": "clientconntestprofile",
                "templateId": 2,
                "templateName": "Test_1",
                "createdAtLocationId":{
                    "type": "locallocationid",
                    "id": 0
                },
                "description": "",
                "templateType": "CL_CONN_TEST_PROFILE",
                "mncTemplateId": 0,
                "ssid": "WebAppsDev",
                "frequencyBand": "BAND_5_GHZ",
                "securityMode": 4,
                "securityType": 1,
                "username": null,
                "password": null,
                "passphrase": "welcome123",
                "pingDestinationServers":[
                    "www.google.com"
                ],
                "wanTestUrl": "www.google.com",
                "pingTestEnabled": true,
                "mnctemplate": false
            },
            {
                "type": "clientconntestprofile",
                "templateId": 3,
                "templateName": "test+2",
                "createdAtLocationId":{
                    "type": "locallocationid",
                    "id": 0
                },
                "description": "",
                "templateType": "CL_CONN_TEST_PROFILE",
                "mncTemplateId": 0,
                "ssid": "WebAppsDev",
                "frequencyBand": "BAND_5_GHZ",
                "securityMode": 4,
                "securityType": 1,
                "username": null,
                "password": null,
                "passphrase": "welcome123",
                "pingDestinationServers":[
                    "www.google.com",
                    "www.yshoo.vv"
                ],
                "wanTestUrl": "www.google.com",
                "pingTestEnabled": true,
                "mnctemplate": false
            }
        ],
        "previousLink": "/CL_CONN_TEST_PROFILE/0/25",
        "nextLink": "/CL_CONN_TEST_PROFILE/2/25",
        "totalCount": 2
    }