i am trying to create content library using rest api. below is my payload.
url = https://{{vc}}/rest/com/vmware/content/local-library
payload =
{
"create_spec": {
"name": "CL2",
"description": "CL1 Desc",
"publish_info": {
"authentication_method": "NONE",
"persist_json_enabled": false,
"published": false
},
"storage_backings": [
{
"datastore_id": "datastore-12",
"type": "DATASTORE"
}
],
"type": "LOCAL"
}
}
though i am able to create content library using GUI, with this request i am facing unauthorized error as below
{
"type": "com.vmware.vapi.std.errors.unauthorized",
"value": {
"error_type": "UNAUTHORIZED",
"messages": [
{
"args": [],
"default_message": "Permission to perform this operation was denied.",
"id": "com.vmware.vdcs.vsphere-auth-lib.permission.denied"
}
]
}
}