Skip to content

Contract Selection

Overview

The Contract Selection feature in Aleph enables users with multiple contracts to switch between assigned contracts seamlessly, whether interacting through the Aleph GUI or via the API. This feature ensures that users access data and services associated with a specific contract, improving the accuracy of task management and product access.

What is a Contract?

A contract represents an agreement between Satellogic and a third-party organization that specifies the terms and services available to the organization’s users. Contracts define the types of products and tasks accessible to users, as well as any restrictions or parameters that apply. In the context of the Contract Selection feature, a contract limits and organizes user interactions to only the data and services assigned to that specific contract.


1. Aleph GUI Users

Workflow

This feature impacts Aleph GUI users who have been assigned more than one contract. Users with a single contract will not see any changes in their experience.

Users with a Single Contract

Users are redirected to Aleph upon login and can operate as usual within their single assigned contract.

Users with Multiple Contracts

  • Login Experience: When logging in, users with multiple contracts will see a dropdown list that allows them to select from their assigned contracts.

Contracts Selection 1

  • Contract Selection: Users select the contract they wish to work with from the dropdown, determining the active contract.

Contracts Selection 2

  • Active Contract View: Only tasks or archive products associated with the active contract will be displayed in the interface.

Contracts Selection 3

  • Switching Contracts: To switch contracts, users can click on the contract name in the top right corner of the screen and select a different contract from the list.

Aleph GUI contract selection summary

Scenario Behavior
Users with a single contract The contract will be selected as default.
Users with multiple contracts Presented with a dropdown to select an active contract upon login.
Switching between contracts Selectable via the contract name in the top right of the Aleph interface.

2. API Users

Workflow

API users can also leverage the contract selection feature by using updated API credentials generated in the Accounts Service Console. The workflow for legacy API credentials remains unchanged.

Legacy API Credentials

Existing API credentials will continue to function without requiring contract selection. However, they will not support multi-contract selection.

New API Credentials

For API credentials generated in the Accounts Service Console, users must specify a contract in each request.

  • Contract Selection via Header: Use the X-Satellogic-Contract-Id header in each request to specify the active contract ID.
  • Fetching Available Contracts: Users can retrieve a list of available contracts by making a GET request to the /my/contracts endpoint. The returned contracts will include each contract’s unique ID, which can then be used in subsequent requests.

Aleph API contract selection summary

Scenario Behavior
Legacy API Credentials Can not select among contracts. The latest assigned contract is sleceted by default
Accounts Service API Credentials Can select among contracts specifying the X-Satellogic-Contract-Id header.

Example Request for Retrieving Contracts

To fetch all contracts available to a user, the following request can be made to the Accounts Service API:

GET https://api.platform.satellogic.com/v2/my/contracts HTTP/1.1
Authorization: Bearer <ACCESS_TOKEN>

{
  "count": 2,
  "next": null,
  "previous": null,
  "results": [
    {
      "contract_id": "cont.e8c1169a-e11a-48ac-ad4c-a69e76fd9b14",
      "name": "First contract",
      "account": "acct.64762159-1df5-4599-9916-79f9f78d8fb8",
      "archive_configuration": {
        "restrictions": [
          "archive-restriction-1",
          "archive-restriction-2"
        ],
        "collections": [
          "collection-1",
          "collection-2"
        ]
      },
      "tasking_configuration": {
        "has_credentials": true
      }
      "created_at": "2024-10-25T10:27:56.152557",
      "updated_at": "2024-10-25T10:28:50.295054",
      "status": "ACTIVE"
    }, {
      "contract_id": "cont.022dc3f5-1ccd-48bc-98cd-6e0d668ed50e",
      "name": "Second contract",
      "account": "acct.64762159-1df5-4599-9916-79f9f78d8fb8",
      "archive_configuration": null,
      "tasking_configuration": {
        "has_credentials": true
      }
      "created_at": "2024-10-25T10:27:56.152557",
      "updated_at": "2024-10-25T10:28:50.295054",
      "status": "ACTIVE"
    }
  ]
}

Example Request for Specifying a Contract in an API Call

Once a contract is identified, a user can make API requests under that contract by specifying the contract ID in the header. In the following example we will fetch a specifc task from a tasking Contract

GET https://api.satellogic.com/tasking/tasks/23272 HTTP/1.1
Authorization: Bearer <ACCESS_TOKEN>
X-Satellogic-Contract-Id: cont.022dc3f5-1ccd-48bc-98cd-6e0d668ed50e

{
    "task_id": 23272,
    "task_name": "My first task",
    "project_name": "My first task project",
    "product": 90,
    "start": "2020-12-22T21:00:00Z",
    "end": "2021-01-11T21:00:00Z",
    "priority": 13,
    "client": "Demo client",
    "target": {
        "type": "Point",
        "coordinates": [
            72.905273,
            19.023001,
            0.0
        ]
    },
    "created_time": "2020-12-23T22:13:52.943224Z",
    "status": "in_progress"
}

This approach provides flexibility to API users with multiple contracts, allowing them to manage tasks and retrieve data according to their active contract configurations.


Last update: 2024-11-01