# Cornerstone

## Connection Requirements

{% stepper %}
{% step %}

### Corp Name

* "corpname" refers to your company's unique subdomain in Cornerstone.
* You can find it in your portal URL, e.g.:

```
https://yourcompany.csod.com
```

→ corpname = yourcompany
{% endstep %}

{% step %}

### Client ID

* Generated Client ID for a user that has the permissions to fetch asset details.
  {% endstep %}

{% step %}

### Client Secret

* Generated Client Secret Key for a user that has the permissions to fetch asset details.
  {% endstep %}

{% step %}

### Is Secure?

* Choose this if your connection is going to be over **HTTPS**.
  {% endstep %}
  {% endstepper %}

***

## To register a new application and get Client ID and Secret

> 🔵 **Cornerstone Portal Steps**

{% stepper %}
{% step %}

* Log in to your **Cornerstone portal**.
  {% endstep %}

{% step %}

* Go to **Admin → Tools → Edge → API Management**.
  {% endstep %}

{% step %}

* Under **Manage Applications**, click **Register New Application**.
  {% endstep %}

{% step %}

* Enter your **Application Name**.
  {% endstep %}

{% step %}

* Provide the **User ID** of an active user in your portal.
  {% endstep %}

{% step %}

* Set the **Access Token Validity Period** (seconds).
  * Valid range: **300 – 86,400**
  * Default: **3600 seconds** *(1 hour)*
    {% endstep %}

{% step %}

* In the **Scopes** section, select the permissions for your app.
  * Scopes control which API endpoints and **HTTP operations (GET, POST, PUT, PATCH)** your app can access.
  * Example: Select **'employee:create'** and **'employee:read'**
    {% endstep %}

{% step %}

* Click **Modify** under an API product to view and select scopes, or check **Cornerstone API** and **Reporting API** to grant full access.
  {% endstep %}

{% step %}

* After selecting scopes, click **Save**.
  {% endstep %}

{% step %}

* Click **Register Application**.
  {% endstep %}

{% step %}

* If the **User ID** is valid, the page refreshes and displays your **Client ID** & **Client Secret**.
  {% endstep %}

{% step %}

* **Copy and store both values securely** — required for integration.
  {% endstep %}
  {% endstepper %}

{% hint style="warning" %}
⚠️ Attention\
Please perform a **connection test** to ensure there is a valid connection to the Cornerstone host.\
When the discovery operation is finalized, you will be able to see the details on the **Assets** page.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.octoxlabs.com/adapters/adapters/cornerstone.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
