cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1281
Views
4
Helpful
14
Replies

so I have a gadget that should test api's

jdickinson
Level 5
Level 5

I have a gadget that when a button is clicked typed parameters can be sent to the web-api links within the finesse ecosystem.

Whats the best way to test if this is working. The online docs aren't covering this.

https://10.10.20.10:8445/finesse/api/

I added as a test https://10.10.20.10:8445/finesse/aip/User

but the results appear to map to response.

14 Replies 14

dekwan
Cisco Employee
Cisco Employee

Hi Joe,

I don't understand what you are trying to accomplish. If you are just trying to try out some APIs, you should be using a REST client tool such as postman.

Thanx,

Denise

That's not helpful.  My gadget is in angular and I am using rx/js within the framework.

within the framework it wouldn't require cors because there isn't any cross domain, but when I try and test out of framework I need to enable CORS to debug what I am doing wrong on the testing.

I don't see a frame of reference for that.

I am sending the same put message for READY within my gadget, but I don't see it changing, but it does change when using postman. I can't figure out why it would be different. So enabling CORS on the server would help me determine that information.

Access control allow origin "*" is a requirement for making cross calls.  i.e.

cors - No 'Access-Control-Allow-Origin' header in Angular 2 app - Stack Overflow

How do I set this on the uccx server?

Finesse started CORS support in 11.5, so any version before that does not have CORS support.

If the REST API call is reaching the Finesse server, it would be logged in the Finesse webservices logs.

Hi Joe,

Information to gather Finesse webservices can be found in the Administration guide: Cisco Finesse Administration Guide Release 11.5(1) - Perform Routine Maintenance [Cisco Finesse] - Cisco

I have taken note that it should probably be added to the developer guide as well. I will work with the Finesse team on that.

Thanx,

Denise

when I run the command to gather the log files. It prompts me for SFTP server IP:

I have an sftp client (filezilla) but not a server what is my next step?

If you don't have a server to put the logs in, you can do it this way too: https://supportforums.cisco.com/document/12356266/how-collect-finesse-logs

I did not find anything in the webservice log that pertains to my calls.

I have created a copy of the project with a test harness beginnings that should at least achieve ready and not_ready state status changes to verify communication to the service.  But I am not having success yet.

git clone GitHub - foxjazz/finesseSandboxGadget

If you could drill down to src/app/test/test.component.ts and tell me what I could be doing wrong.

Thanks.

Hi Joe,

But I am not having success yet.

Can you be more specific? This can mean many things. This could mean you get a HTTP status code back that is not a 202. Or you do get a successful HTTP status code, but the state isn't changed.


I am not familiar with coding with angular so my comments may not be valid, but I noticed that you are trying to set the agent state to READY, NOT_READY, but have you already logged in the agent? You cannot use these APIs unless the agent is logged in. Also, I see that the authorization is commented out. These APIs need Basic Auth.


I would suggest making your test even simpler by trying to get the SystemInfo API working. This requires no authentication and is just a GET.


Thanx,

Denise

hey, need some help

I am trying postman with systeminfo  http://hq-uccx.abc.inc:8082/finesse/api/Systeminfo

and get a 404

I am connected

I have the desktop open

jabber is connected

Hi Joe,

Is that the exact URL you are using because the it should be SystemInfo and not Systeminfo.

Thanx,

Denise

The debug data says:

vendor.bundle.js:96633 GET https://hq-uccx.abc.inc:8082/finesse/api/SystemInfo net::ERR_SSL_PROTOCOL_ERROR

I am trying to make the call in my third party gadget.

return this.http.get(this.uri + this.command)

Need a resolution as to why this doesn't resolve to any data.

In your other posts, you mention needing the browser origin header. Finesse does not support this until Finesse 11.5.

ssl needs to be to port 8445