cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3938
Views
4
Helpful
10
Replies

I'm getting an "INVALID_CREDENTIALS" trying to get a service ticket

tdichter
Cisco Employee
Cisco Employee

I got a basic APIC-EM system, which I can login to with the default username (admin) and pwd (secrete)

Via POSTMAN, I want to get the ticket in order to fill in the x-auth-token header.

here's the REST API I am trying to do:

POST - url: https://sandboxapic.cisco.com:9443/api/v1/ticket

Body:

{"username": "admin" , "password": "secrete"}

return error:

{"response":{"errorCode":"INVALID_CREDENTIALS","message":"Please provide valid credentials","detail":"Authentication Failed"},"version":"1.0"}

Any idea what is missing here? I followed the intro videos and tried that on my system.

Thanks,

10 Replies 10

Joe Clarke
Cisco Employee
Cisco Employee

Is that the correct URL?  That's your APIC-EM, or are you trying to use a DevNet sandbox instance?  What version of APIC-EM are you using?

jawicks
Cisco Employee
Cisco Employee

I think you may be missing part of the header, I am using the following to obtain ticket via REST API and it's working fine.

apic_controller = 'https://10.52.145.13'

apic_uri = '/api/v1/ticket'

header = {'content-type': 'application/json'}

body = '{"username":"restapi_user","password":"restapi_Password123"}'

resp = requests.post(apic_controller + apic_uri, data=body, headers=header,verify=False)

or from browser REST client

Capture.JPG

yawming
Cisco Employee
Cisco Employee

For url: https://sandboxapic.cisco.com:9443/api/v1/ticket

Body:

{"username": "admin" , "password": "secrete"}

It's really an invalid credential. :-)

Please check Sandbox APIC-EM always on Lab.

https://devnetsandbox.cisco.com/RM/Diagram/Index/2e0f9525-5f46-4f46-973e-0f0c1bf934fa?diagramType=Topology

to get the right password.

Thanks, but in the URL that you sent me there is no info about the correct password for the APIC-EM.

When I 1st got it, it showed in the login page that the username is admin and the pwd is "secrete" for the temp node.

What is the operational user for the APIC-EM? I.E for ACI, it was admin ins3965! ...

Thanks,

Tomer

You need to login first,  then the Sandbox Labs Catalog will be listed in alphabetical order.

https://devnetsandbox.cisco.com/RM/Topology

Pick APIC-EM DB only always on lab and the password is in the instruction. The password won't be always the same so this is the right place to check the password.

I see, so basically https://sandboxapic.cisco.com/ is not a real APIC-EM that I can do stuff on it, I need to go to downloads and get me a real LAB to use, correct?

The temp log in node for https://sandboxapic.cisco.com/ is (Temporary Note: default login - admin / secrete) - Just wanted to make sure that this is not the correct setup to work with if I want to do REST API as the videos show.

Thanks,

First of all, https://sandboxapic.cisco.com/ is old EFT2 version and https://sandboxapic.cisco.com:9443 is GA1, the latest release.

They are all real APIC-EM servers, just DB only lab the inventory is getting from DB (which is a snapshot of real devices).

It depends on what would you like to test. The DB only lab already can be used for a lot of things(like REST API application test) but if you need to use "live" devices then you use the reservation lab which everything is live.

Thanks,

after I tried sandboxapic.cisco.com:9443, and put the pwd C!sc0123 with the user admin, as apicem_config.py shows, I am good, running the POST for that URL, with the pwd given works.

Thanks for the help!

I'm not able to access https://sandboxapic.cisco.com:9443/api/v1/ticket using admin and C!sco0123. I don't see the username and password posted for the always on lab but I do see them for the labs that require reservations.

To use API in Sandbox please try to use:

url = "https://devnetapi.cisco.com/sandbox/apic_em/api/v1/ticket"

payload = {"username":"devnetuser","password":"Cisco123!"}

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:


This community is intended for developer topics around Data Center technology and products. If you are looking for a non-developer topic about Data Center, you might find additional information in the Data Center and Cloud community