Skip to content

Entitlement Service GraphQL API ​

The Entitlement Service GraphQL API powers product catalog, entitlement summaries, allocated users, assignable users, and entitlement activity log views. For write operations (allocations, bulk imports), use the REST API.

Endpoints ​

CapabilityURL
GraphQL endpointPOST http://127.0.0.1:4317/graphql

When running locally, a GraphiQL explorer is available at http://127.0.0.1:4317/graphiql.

Example Queries ​

Product List ​

graphql
query EntitlementProducts($organizationId: ID!) {
  products(organizationId: $organizationId) {
    id
    icon
    name
    provider
    description
    status
    supportedPlatforms
    usageDimensions {
      code
      name
      description
      unit
    }
    entitlementInfo {
      entitlementCode
      grantType
      allocationModel
      subscriberId
      subscriberAccountId
      renewalDate
    }
  }
}

Variables:

json
{
  "organizationId": "org-demo-001"
}

Product Detail ​

Returns product information, entitlement entries, quantity summary, allocated users, and assignable user rows in a single query.

graphql
query EntitlementProductDetail($productId: ID!, $organizationId: ID!) {
  product(id: $productId, organizationId: $organizationId) {
    id
    icon
    name
    provider
    description
    status
    supportedPlatforms
    usageDimensions {
      code
      name
      description
      unit
    }
    entitlementInfo {
      entitlementCode
      grantType
      allocationModel
      subscriberId
      subscriberAccountId
      renewalDate
    }
  }

  entitlements(productId: $productId, organizationId: $organizationId) {
    id
    productId
    entitlementCode
    usageDimensionCode
    purchasedQuantity
    allocatedQuantity
    status
    startDate
    endDate
    source
  }

  productEntitlementSummary(productId: $productId, organizationId: $organizationId) {
    productId
    purchasedQuantity
    allocatedQuantity
    availableQuantity
  }

  allocatedUsers(productId: $productId, organizationId: $organizationId) {
    id
    productId
    entitlementId
    seatQuantity
    name
    email
    department
    status
    allocatedAt
    sourceJobId
  }

  productUserAccess(productId: $productId, organizationId: $organizationId) {
    id
    productId
    entitlementId
    entitlementCode
    seatQuantity
    name
    email
    department
    status
    isAllocated
    allocatedAt
  }
}

Variables:

json
{
  "organizationId": "org-demo-001",
  "productId": "prod-insight-studio"
}

Activity Log ​

graphql
query EntitlementActivityLogs($input: ActivityLogListInput!) {
  activityLogs(input: $input) {
    totalElements
    items {
      id
      productId
      productName
      entitlementId
      actor {
        type
        displayName
        email
      }
      target {
        type
        id
        name
      }
      action
      actionLabel {
        id
        defaultMessage
        values {
          key
          value
        }
      }
      summary
      summaryMessage {
        id
        defaultMessage
        values {
          key
          value
        }
      }
      quantityDelta
      result
      eventTime
    }
  }
}

Variables:

json
{
  "input": {
    "organizationId": "org-demo-001",
    "productId": "prod-insight-studio",
    "sortField": "eventTime",
    "sortDirection": "desc",
    "pageNumber": 0,
    "pageSize": 50
  }
}

pageNumber is zero-based. pageSize defaults to 50 with a maximum of 500. Supported sort fields: actor, summary, product, result, eventTime.