Wired Intelligent Edge (Campus Switching and Routing)

Upcoming community maintenance Oct. 27th through Oct. 29th
For more info click here
Reply
Highlighted

Re: AOS-S REST API - Delete VLAN & File-Transfer

Please try with "http://192.168.1.10/rest/v1/file-transfer", instead of v2.

Highlighted
Occasional Contributor II

Re: AOS-S REST API - Delete VLAN & File-Transfer

Still error 404... Here's the debug log of the Switch:

0000:01:19:58.50 rest tHttpd:Received REST POST request
0000:01:19:58.56 rest tHttpd:(http_state:)http_process_post END
0000:01:19:58.63 rest tHttpd:REST request redirected to REST server
0000:01:19:58.70 rest tHttpd:Send REST request message to REST control task
0000:01:19:58.79 rest tHttpd:tHttpd is unblocked with necessary cleanup
0000:01:19:58.86 rest mrest_ctrl:Request for parse header
0000:01:19:58.92 rest mrest_ctrl:Request for parse header after method POST
0000:01:19:59.00 rest mrest_ctrl:uri len = 22
0000:01:19:59.05 rest mrest_ctrl: PARSE header Cookie  value : (null)
0000:01:19:59.13 rest mrest_ctrl:Validate operation:  operation is allowed 2
0000:01:19:59.21 rest mrest_ctrl:Rest valid Operation.
0000:01:19:59.27 rest RestSrv-2:Method = POST, URI = /rest/v1/file-transfer
0000:01:19:59.35 rest RestSrv-2:status = 404, reason = Not Found
0000:01:19:59.41 rest mrest_ctrl:read len 146
0000:01:19:59.46 rest mrest_ctrl:bytes_pending 0, nsent 146
0000:01:19:59.53 rest mrest_ctrl:read len 38
0000:01:19:59.57 rest mrest_ctrl:bytes_pending 0, nsent 38
0000:01:19:59.64 rest mrest_ctrl:read len 0
0000:01:19:59.68 rest mrest_ctrl:REST response is sent
0000:01:19:59.74 rest mrest_ctrl:REST request processed successfully

Highlighted

Re: AOS-S REST API - Delete VLAN & File-Transfer

OK.

So, several things :

- Are you authenticated when you make you're request ? (Meaning, do you use a header/cookie - I don't see it in you POST) ?

- Do you have any issue with another API on this platform/version ?

- Can you upgrade your platform ? (Maybe an issue with this release)

 

Thanks.

Highlighted
Occasional Contributor II

Re: AOS-S REST API - Delete VLAN & File-Transfer

1. Yes was unauthenticated, but also with authentication it's the same result:

0000:01:33:12.39 rest tHttpd:Received REST POST request
0000:01:33:12.45 rest tHttpd:(http_state:)http_process_post END
0000:01:33:12.52 rest tHttpd:REST request redirected to REST server
0000:01:33:12.59 rest tHttpd:Send REST request message to REST control task
0000:01:33:12.67 rest tHttpd:tHttpd is unblocked with necessary cleanup
0000:01:33:12.75 rest mrest_ctrl:Request for parse header
0000:01:33:12.81 rest mrest_ctrl:Request for parse header after method POST
0000:01:33:12.89 rest mrest_ctrl:uri len = 22
0000:01:33:12.94 rest mrest_ctrl: PARSE header Cookie  value :
   sessionId=jFbTpMktZQKAVFkc9IcVoXGEVUXrhu6IeuMOaK0BmbJgfq3ClodjZS6mpruagyL
0000:01:33:13.08 rest mrest_ctrl:Validate operation:  operation is allowed 2
0000:01:33:13.17 rest mrest_ctrl:Rest valid Operation.
0000:01:33:13.22 rest RestSrv-2:Method = POST, URI = /rest/v2/file-transfer
0000:01:33:13.30 rest RestSrv-2:status = 404, reason = Not Found
0000:01:33:13.37 rest mrest_ctrl:read len 146
0000:01:33:13.42 rest mrest_ctrl:bytes_pending 0, nsent 146
0000:01:33:13.49 rest mrest_ctrl:read len 38
0000:01:33:13.53 rest mrest_ctrl:bytes_pending 0, nsent 38
0000:01:33:13.60 rest mrest_ctrl:read len 0
0000:01:33:13.64 rest mrest_ctrl:REST response is sent
0000:01:33:13.70 rest mrest_ctrl:REST request processed successfully

 

2. I didn't test all the API's. Just tested to create and delete VLAN's and this is working.

 

3. Yes It is possible for me to upgrade the version. I tried now several versions YA.16.02.0014, YA.16.02.0025 and YA.16.03.0007. It's the same error code with all of these versions. The only version I get that to work with is YA_16_04_0013. Does that mean that file transfer is just working correctly with REST V4?

Highlighted

Re: AOS-S REST API - Delete VLAN & File-Transfer

I've tried with release 16.03 if I remember, and no issues...

I'll try to test if possible.

 

Highlighted
Aruba Employee

Re: AOS-S REST API - Delete VLAN & File-Transfer

Hi Airmart,

In addition to Arnaud's great help here, I'd like to point out some Python REST API framework that we have posted on our public GitHub, located here: https://github.com/aruba/arubaos-switch-api-python

 

These workflows show examples for configuring (and unconfiguring) multiple things for the AOS-Switch.  Note that as you've run into already, many REST calls require later versions of software, such as 16.04.

 

Also, I'd like to point you to a brand new Airheads Developer Community group where we discuss topics such as REST, Python, and other automation frameworks and tools, such as Ansible and the Network Analytics Engine.  This Developer Community is located here: https://community.arubanetworks.com/t5/Developer-Community/gp-p/NetworkAbstraction

 

Cheers,

Alvin

Highlighted
Occasional Contributor II

Re: AOS-S REST API - Delete VLAN & File-Transfer

Hi Alvin,

thank you for pointing me to the new forum, perhaps the thread should then be moved to the Developer Community forum?

 

Regarding the transfer-file API:

Perhaps this API is bugged in 16.02 & 16.03? Because "/rest/v1/file-transfer" is perfectly working with 16.04 for me...

Search Airheads
cancel
Showing results for 
Search instead for 
Did you mean: