Exercise 2: Find a Scope (Project) OID Token in the UI
This topic explains how to associate a project and view in Agility user interface using data from the API.
Overview
This tutorial will help you associate a project (Scope) that you would normally see in the Digital.ai Agility UI with data from the API.
Prerequisites
-
Access to a Digital.ai Agility 17.0 instance or newer.
-
Knowledge of the Agility API Console
What you'll learn
-
How to find the OID Token of a Scope within the Agility UI
-
How to use the numeric portion of an OID Token to get the default API representation of a Scope using the Agility HTTP Tool
Step 1: View the Projects page in VersionOne
To get started, navigate to theProjectspage in our Agility example instance. Use the usernameadminand passwordadminwhen prompted.
You should see a page like this after authenticating:
Our goal is to query our Agility instance by asking questions about Scope 0. Scope is a system name for project. When we do our query, we will see the name of the project that is known in the system as Scope:0. Recall that in Exercise 1: Basic Use of the API Console, we did a basic query on the Scope 0. In this exercise, we will find the OID to a specific project name, and then query it the same way we did in Exercise 1.
Follow these steps to get the previous page into full screen mode:
-
Click VersionOne REST API 101
-
Click on the button indicated by the arrow.
Step 2: Isolate the OID in the URL
- Copy the text after the**=sign in the highlightedoidTokenquery string parameter to your clipboard,but note this:You may seeoidToken=Scope%3A1005instead ofoidToken=Scope:1005**. This is because of URL encoding. The**%3Ais the encoded value for the:**character.
- Paste this value (should beScope:1005orScope%3A1005) into a text editor and then:
-
Replace the**:(or%3Acharacters) with a single/character, producingScope/1005**
-
Finally, prefix the whole thing with another single**/character, producing/Scope/1005**
-
Still with us? Keep your**/Scope/1005**text handy, and head to Step 3!
Step 3: Examine your query and execute
- Now that you have learned how to decompose the URL and extract the OID, modify your URL so that your API Console looks like this.
- Click Send.
Voila! Here is the output of your query.
Review
In this exercise, you learned how to:
-
Decompose a URL from the Project view in the UI.
-
Use the results of the URL decomposition to query the project in Rest.
Quiz
Create an OID from www16.v1host.com/api-examples/rest-1.v1/Data/Scope/2020.
Submit