- name: Create Config_Assignments
ansible.builtin.uri:
method: POST
headers:
Accept: application/json
Content-Type: application/json
Authorization: 'Bearer {{aruba_apikey.json.access_token}}'
body_format: json
body:
config-assignment:
- scope-id: '86811126654554112'
device-function: ACCESS_SWITCH
profile-type: layer2-vlan
profile-instance: '8'
validate_certs: no
return_content: true
Original Message:
Sent: Mar 05, 2026 05:35 PM
From: Collin.Koss
Subject: New Central Config Assignment API keeps failing
Hi Eric,
We're currently transitioning to a new endpoint for configuration assignment that's more user friendly. The documentation needs to be fixed to match the proper endpoint/payload, this will be done soon! The correct endpoint is the bulk path of https://us1.api.central.arubanetworks.com/network-config/v1alpha1/config-assignments and the payload is similar to that of scope-maps with a nested dictionary containing a list of mappings. It looks like you are missing the "config-assignment" key/value pair in your payload which is causing your issue.
Here is an example of a config-assignments payload that should work for you:
curl --location 'https://us1.api.central.arubanetworks.com/network-config/v1alpha1/config-assignments' \--header 'Content-Type: application/json' \--header 'Authorization: Bearer <token>' \--data '{ "config-assignment": [ { "scope-id": "86811126654554112", "device-function": "ACCESS_SWITCH", "profile-type": "layer2-vlan", "profile-instance": "8" } ]}'
Give this a shot and let me know if that worked!
Original Message:
Sent: Mar 05, 2026 03:47 PM
From: Eric Dresser
Subject: New Central Config Assignment API keeps failing
It looks like the API referenced here functions however
https://developer.arubanetworks.com/new-central/docs/working-with-library-profiles#assigning-with-central-api
curl --request POST \ --url https://{base_url}/network-config/v1alpha1/scope-maps \ --header 'accept: application/json' \ --header 'authorization: Bearer {{token}}' \ --header 'content-type: application/json' \ --data '{ "scope-map": [ { "scope-name": "1234567", "persona": "ACCESS_SWITCH", "resource": "layer2-vlan/404" } ]}'
Original Message:
Sent: Mar 05, 2026 12:57 PM
From: Eric Dresser
Subject: New Central Config Assignment API keeps failing
Wondering if anyone has gotten this to work.
I'm plugging in my values on the website directly which produces this
curl --request POST \
--url https://us1.api.central.arubanetworks.com/network-config/v1alpha1/config-assignments/86811126654554112/ACCESS_SWITCH/layer2-vlan/8 \
--header 'accept: application/json' \
--header 'authorization: Bearer {{token_goes_here}}' \
--header 'content-type: application/json' \
--data '
{
"device-function": "ACCESS_SWITCH",
"profile-instance": "8",
"profile-type": "layer2-vlan",
"scope-id": "86811126654554112"
}
'
I keep getting
{
"errorCode": "HPE_GL_ERROR_BAD_REQUEST",
"httpStatusCode": 400,
"message": "Invalid payload",
"debugId": "480916939e90ef9b536291fd497b9700"
}
Here is the output for that vlan if i manually assign and GET the API
{
"scope-id": "86811126654554112",
"device-function": "ACCESS_SWITCH",
"profile-type": "layer2-vlan",
"profile-instance": "8",
"scope-name": "Site_Col",
"scope-type": "SITE_COLLECTION"
},
-------------------------------------------