Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • TREP APIs /
  • Open DACS /
avatar image
Question by Ashish Gupta · Mar 18, 2020 at 09:36 PM · odpsodps dacs _system_

How to get service and PE for any user?

I have user details and I want to the services and exchange codes he is entitled to. How to achieve it?

People who like this

0 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

2 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by zoya.farberov · Mar 18, 2020 at 10:07 PM

Hello @Ashish Gupta,

In Developer Guide for your language option, for example OpenDacs - Java Development Guides look up AuthorizationAgent -> getPEList().

If you are just starting with OpenDACS I would suggest to first work through OpenDACS QuickStart Guide and OpenDACS Tutorials (I include likes to Java, the exact same materials can be found in C++ and .Net),

as together, these materials give a working understanding of the fundamentals of OpenDACS API.

Hope this helps

Comment
wasin.waeosri

People who like this

1 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
REFINITIV
Answer by Pimchaya.Wongrukun · Mar 19, 2020 at 03:34 AM

Hello @Ashish Gupta

You can modify DacsSubscribeClient.java to get the list of services on DACS as example snipped source code below:

  private Vector<AuthorizationServiceAttributes> _getServiceAttributes() {
        try  {
            // AuthorizableServiceAttributes is an instance for keeping 
            // attributes information of an authorizable service.
            Vector<AuthorizationServiceAttributes> services = new Vector<AuthorizationServiceAttributes>();
            /*
             * Pass the vector of AuthorizableServiceAttribute instances as 
             * a parameter of the AuthorizationAgent's getServiceAttributes()
             * method.It will be pushed the attributes of all authorizable 
             * services within that method.
             */
            AuthorizationCheckResult authCheckResult = _agent.getServiceAttributes(services);
            // Check the result of calling the getServiceAttributes() method.
            if (authCheckResult == AuthorizationCheckResult.ACCESS_ALLOWED) {
                // Calling the method success.
                return services;
            } else {
                // Calling the method failed, return null.
                return null;
            }
        } catch (AuthorizationException ae) {
            System.err.println("AuthorizationAgent.getServiceAttributes() failed");
            return null;
        }
    }

Then, check if the user is entitled to each service.

public void checkAuthorizableServices() {
        Vector<AuthorizationServiceAttributes> services = _getServiceAttributes();
        if (services != null) {
            System.out.println("Connected DACS server has " + services.size()
                    + " authorizable service(s)");
            for (int i = 0; i < services.size(); i++) {
                AuthorizationServiceAttributes attrs = services.get(i);
                System.out.println("#" + (i + 1) + "#");
                System.out.println("  Service   ID: "
                        + attrs.getServiceId());
                System.out.println("  Service Name: "
                        + attrs.getServiceName());
                System.out.println("  Service Type: "
                        + attrs.getServiceType());
                System.out.println("  Service  Qos: "
                        + attrs.getServiceQoS());
                 AuthorizationCheckStatus authCheckStatus = new AuthorizationCheckStatus();
                 try {
                     AuthorizationCheckResult     authCheckResult = _agent.checkSubscription(_handle, _usage, _reqtype,
                         authCheckStatus,services.get(i).getServiceName());
                     if (authCheckResult == AuthorizationCheckResult.ACCESS_ALLOWED) {
                         System.out.println("[" + _daemonHost + "] " + _name +
                          " allowed subscription access to service " + services.get(i).getServiceName());
                     }
                     else {
                         System.out.println("[" + _daemonHost + "] " + _name +
                          " denied subscription access to service " + services.get(i).getServiceName());
                         System.out.println("status message - " +
                          authCheckStatus.getStatusText());
             }
   } catch (AuthorizationException ae) {
     // In case the exception occurs during calling method.
     System.err.println("[" + _daemonHost + "] " + _name +
                        " check subscription service  " + services.get(i).getServiceName() +
                        " failed");
           }
            }
        }
}

The example output:


exampleoutput.png (26.3 KiB)
Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
10 People are following this question.

Related Questions

DACS API - How to do data access control system (DACS ) daemon setup on windows?

Open DACS migrate to ODPS - multi-domain support

How to get DacsLockIDs for any service?

ODPS query timeout for more than 2mins

HTTP ODPS requests

  • Feedback
  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Careers
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Calais
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRIT
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • World-Check Data File
  • Explore
  • Tags
  • Questions
  • Badges