Author Topic: PCS API for automated tasks  (Read 5823 times)

Guillaume

  • EA Practitioner
  • ***
  • Posts: 1351
  • Karma: +42/-2
    • View Profile
    • www.umlchannel.com
PCS API for automated tasks
« on: September 25, 2024, 02:24:24 am »
Hello,

I have a client using PowerShell to extract information from EA and generating an Excel using the Interop EA. There is an issue for scheduled tasks since a session needs to be active so an EA process can be created.
I wonder if the PCS API could be a suitable alternative but I'm not sure the required license for this. Would a single PCS Token license work to run an individual Powershell script ? Should the PCS reduce the execution time ?

Thanks
Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com


Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13241
  • Karma: +554/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: PCS API for automated tasks
« Reply #1 on: September 25, 2024, 08:33:39 pm »
I think you should indeed need only one token.

Be careful though. The PCS API is not at all comparable to the regular API.
You can get information out, but not as easily as you might be used to.

Geert

Guillaume

  • EA Practitioner
  • ***
  • Posts: 1351
  • Karma: +42/-2
    • View Profile
    • www.umlchannel.com
Re: PCS API for automated tasks
« Reply #2 on: October 16, 2024, 12:47:27 am »
I started using the PCS API and managed to get an auth token from an EA DB without any security (for some reasons I can't get it to work with internal EA accounts).
Looking at the query capability, it doesn't seem to be as open as EA API e.g. running a SQL query on EA DB. Having said that, there may be a way to do it since it's possible to define custom queries on Prolaborate which uses the PCS API.

I'd like for instance to get the ProjectGUID which is usually available from EA.Repository, or from the DB with "select value  from usys_system where property = 'ProjectGUID'"

Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com


ea0522

  • EA User
  • **
  • Posts: 134
  • Karma: +5/-0
    • View Profile
Re: PCS API for automated tasks
« Reply #3 on: October 16, 2024, 06:32:27 pm »
If you only need to extract information from the EA repository, would it be an option to connect to the database directly using ODBC or something?
That could provide you with the GUIDs needed to perform the update tasks using the PCS API.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13241
  • Karma: +554/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: PCS API for automated tasks
« Reply #4 on: October 16, 2024, 06:49:56 pm »
I started using the PCS API and managed to get an auth token from an EA DB without any security (for some reasons I can't get it to work with internal EA accounts).
Looking at the query capability, it doesn't seem to be as open as EA API e.g. running a SQL query on EA DB. Having said that, there may be a way to do it since it's possible to define custom queries on Prolaborate which uses the PCS API.

I'd like for instance to get the ProjectGUID which is usually available from EA.Repository, or from the DB with "select value  from usys_system where property = 'ProjectGUID'"
A while ago I went through the same process and had the same question about SQL queries from the PCS API.
It must be possible, or otherwise prolaborate wouldn't be able to do it, but I haven't found any documentation about is.

My next move was to setup a local installation, and try debug the code to figure out what code exactly is executed when performing a search.
I didn't get that far yet, but maybe the guys from Sparx Systems India can help us out and tell us the secret? ;D

Geert

Guillaume

  • EA Practitioner
  • ***
  • Posts: 1351
  • Karma: +42/-2
    • View Profile
    • www.umlchannel.com
Re: PCS API for automated tasks
« Reply #5 on: October 16, 2024, 06:59:36 pm »
If you only need to extract information from the EA repository, would it be an option to connect to the database directly using ODBC or something?
That could provide you with the GUIDs needed to perform the update tasks using the PCS API.

The aim here is to make sure that the script runs on the correct EA project but querying the Project GUID and comparing it the value provided as a script parameter.
This was just an example of the need to run a query via the PCS (it's not the only one).
Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com


Guillaume

  • EA Practitioner
  • ***
  • Posts: 1351
  • Karma: +42/-2
    • View Profile
    • www.umlchannel.com
Re: PCS API for automated tasks
« Reply #6 on: October 16, 2024, 07:02:57 pm »
A while ago I went through the same process and had the same question about SQL queries from the PCS API.
It must be possible, or otherwise prolaborate wouldn't be able to do it, but I haven't found any documentation about is.

My next move was to setup a local installation, and try debug the code to figure out what code exactly is executed when performing a search.
I didn't get that far yet, but maybe the guys from Sparx Systems India can help us out and tell us the secret? ;D

Geert

Thanks for confirming what I suspected. I'll try to find out how to do this. The available OSLC resources would probably not only be limited in terms of the information I need, but also time consuming to retrieve bulk information if individuals calls are needed.
Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com