cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1688
Views
6
Helpful
4
Replies

Extend APIC API token timeout

mr.richardb
Level 1
Level 1

Hi all,

I was wondering the other day if there is a API call that can increase the API token timeout. Right now it is 600sec=10mins which is okay but could be more. I came across this managed object "/uni/userext/pkiext/webtokendata" while googling other ACI stuff which hold the settings for various things. So I did a little visore digging ad found this "webtokenTimeoutSeconds" object which was set to 600sec. So I started to play with it and it worked. I was able to extend the token lifetime.

The  API endpoint is https://apic.example.com/api/node/mo/uni/userext/pkiext/webtokendata.json

And the POST request body is the following:

 

 

{
	"pkiWebTokenData": {
		"attributes": {
			"dn": "uni/userext/pkiext/webtokendata",
                        "webtokenTimeoutSeconds": "3600"
		},
		"children": []
	}
}

 

 

Hope that helps for anyone else too. 

Regards,

Ricgard

4 Replies 4

Alexander Stevenson
Cisco Employee
Cisco Employee

Thanks for sharing!

apfeil
Level 1
Level 1

I used this example for uploading firmware to the GUI. The upload was timing out with a 403 failure. I used this exact query as a get and it showed 600. I then did the post and added the body and it updated to 3600. I re-ran the get request and it showed 3600. I then re-uploaded the firmware and it was successful. Thanks for the post!

Ruben Cocheno
Spotlight
Spotlight

@mr.richardb 

Has this been resolved?

Tag me to follow up.
Please mark it as Helpful and/or Solution Accepted if that is the case. Thanks for making Engineering easy again.
Connect with me for more on Linkedin https://www.linkedin.com/in/rubencocheno/

apfeil
Level 1
Level 1

The help is in the original post on this one.