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

"[Network] is not unique" error while trying to get rule from domain with global policy(provider1)

Jump to solution

Hi,

I have a multi-domain server (Provider 1) with a domain (global policy assigned).

I tried to get rule using R80 API, it shows error "Requested object name [Network] is not unique."

To login I used following syntax:

{

"user" : "username",
"password" : "password",

"domain" : "domain name"

}

To get rule i used "show-access-rule" and syntax used is:

{
"name" : "Clean up",
"layer" : "Network"
}

This works fine with the domain without global policy assigned. What is the correct way to fetch this from a domain with global policy? The rule which I am trying to fetch is not a global rule.

When I tried fetching the list of layers I got two "Network" layer:

{
"access-layers": [
{
"uid": "4847c238-7891-446b-ba68-a540e67155be",
"name": "Network",
"type": "access-layer",
"domain": {
"uid": "e0d03ca1-01cc-43b4-a09f-0ef5eb1d9dc7",
"name": "domain name",
"domain-type": "domain"
}
},
{
"uid": "87ed1061-d5f9-4318-90d9-1be3badc4c76",
"name": "Network",
"type": "access-layer",
"domain": {
"uid": "1e294ce0-367a-11e3-aa6e-0800200c9a66",
"name": "Global",
"domain-type": "global domain"
}
},
{
"uid": "7c45f8a9-07c6-4ac8-9f48-c791b8ab3dad",
"name": "Policy1 Network",
"type": "access-layer",
"domain": {
"uid": "1e294ce0-367a-11e3-aa6e-0800200c9a66",
"name": "Global",
"domain-type": "global domain"
}
}
],
"from": 1,
"to": 3,
"total": 3
}

0 Kudos
1 Solution

Accepted Solutions
Employee++
Employee++

Re: "[Network] is not unique" error while trying to get rule from domain with global policy(provider1)

Jump to solution

You have two policy layers named "Network" - one in a local domain and other in a global domain.

When you assign a glopal policy to a domain, the policy package now contains two layers with a same name - hence the ambiguity.

To overcome this name ambiguity, you have to use the UID of the layer in API commands.

3 Replies
Employee++
Employee++

Re: "[Network] is not unique" error while trying to get rule from domain with global policy(provider1)

Jump to solution

You have two policy layers named "Network" - one in a local domain and other in a global domain.

When you assign a glopal policy to a domain, the policy package now contains two layers with a same name - hence the ambiguity.

To overcome this name ambiguity, you have to use the UID of the layer in API commands.

Re: "[Network] is not unique" error while trying to get rule from domain with global policy(provider1)

Jump to solution

Hi Robert,

Thanks for the reply.

Is this the only way (using UID) to tell API which layer we want to use.

0 Kudos
Employee++
Employee++

Re: "[Network] is not unique" error while trying to get rule from domain with global policy(provider1)

Jump to solution

After the global policy assignment - yes.

You can extract the UID from the access-layers query, mentioned in your post above.

The domain name field in the above response is your reference to the correct layer.