cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
859
Views
0
Helpful
7
Replies

403 Forbidden for csapi_collections ONLY

josh1
Level 1
Level 1

I am trying to use the /import-inventory and /import-inventory-status API and am getting 403 forbidden.  I can access the other csapi modules with no problems.  I'm using the same authentication credentials for both, in the same call to the script.  I confirmed that csapi_collections is enabled for the user.

 

I saw a note about the API being broken for new users; is there any chance that it's also broken for existing users in any way?

 

DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): apx.cisco.com
send: b'GET /cs/api/v1/collections/import-inventory-status?inventoryName=Testing&customerId=REDACTED HTTP/1.1\r\nHost: apx.cisco.com\r\nUser-Agent: python-requests/0.0.0\r\nAccept-Encoding: gzip, deflate\r\naccept: application/json\r\nConnection: keep-alive\r\nauthorization: bearer REDACTED\r\n\r\n'
reply: 'HTTP/1.1 403 Forbidden\r\n'

7 Replies 7

Suchita Shewale
Cisco Employee
Cisco Employee

Hi Josh,  Did you register for csapi-collections recently?

 

Regards

Suchita

No.  I saw the notice about problems with new accounts but this has been registered for some time.

josh1
Level 1
Level 1

Can you provide any further assistance?

josh1
Level 1
Level 1

Still no response.  Should I just check back in two weeks?

@josh1 Can you give it a try and redo the registration for csapi-collection API and share the results with us?

josh1
Level 1
Level 1

It's working.  Script had been changed to use a Cisco test secret while working on previous issues, but that did not have access to the collections API.  Switched it back to the other secret and it's working correctly.

Suchita Shewale
Cisco Employee
Cisco Employee

Glad to know it is working. Thanks for the update.