To access data in the API, you must first establish a valid session.
Then proceed as follows:
- If you are using the P6 Professional API, see the next topic, "Example: Establishing a Session in Local Mode" for an example of how to establish a session and load a collection of projects. Remember the P6 Professional API can run in Local Mode only.
- If you are using the P6 Integration API, see the next two topics as applicable: "Example: Establishing a Session in Local Mode" and "Example: Establishing a Session in Remote Mode." (Code written for Local Mode is the same as code written for Remote Mode, except for calls to Session.getDatabaseInstances() and Session.login(), which require the appropriate information to be specified for finding the server.)