Catalog API — Queries

Retrieve the content catalog for the authenticated company.

Endpoint
POSThttps://api.udacity.com/api/public/api/v1/catalog/graphql

catalog

Required scope: COMPANY:<companyId>

contractIdID

Optional contract ID to filter results by a specific contract.

Returns: CompanyCatalog!

Signature
type Query {
  catalog(contractId: ID): CompanyCatalog!
}
Query
query GetCatalog($contractId: ID) {
  catalog(contractId: $contractId) {
    companyId
    programs {
      key
      version
      locale
      type
      title
      summary
      syllabusUrl
      imageUrl
      redirectUrl
      duration
      modifiedDate
      ssoLaunchLinksByContract {
        contractId
        launchUrl
      }
      skillNames
      difficultyLevel
    }
    assessments {
      id
      title
      category
      passingScore
      isTimed
      timeLimit
      totalQuestionsInAssessment
    }
    learningPlans {
      id
      title
      key
      slug
      steps {
        stepId
        stepType
        label
      }
    }
  }
}
Variables
{
  "contractId": "optional-contract-id"
}
Response
{
  "data": {
    "catalog": {
      "companyId": "4821",
      "programs": [
        {
          "key": "nd00113",
          "version": 1,
          "locale": "en-us",
          "type": "DEGREE",
          "title": "Cloud Architecture",
          "summary": "Learn the fundamentals of programming with Python.",
          "duration": "P30D",
          "modifiedDate": "2025-06-15T10:00:00Z",
          "skillNames": ["Python", "Cloud Computing"],
          "difficultyLevel": "Intermediate"
        }
      ],
      "assessments": [
        {
          "id": "87fac66e",
          "title": "Python Fundamentals Assessment",
          "category": "PASS_FAIL",
          "passingScore": 80.0,
          "isTimed": true,
          "timeLimit": "PT30M",
          "totalQuestionsInAssessment": 25
        }
      ],
      "learningPlans": [
        {
          "id": "fd6f0490",
          "title": "Cloud Engineering Onboarding",
          "key": "cloud-eng-onboarding",
          "slug": "cloud-engineering-onboarding",
          "steps": [
            { "stepId": "step-1", "stepType": "PROGRAM", "label": "Cloud Architecture" }
          ]
        }
      ]
    }
  }
}

Learning Plan Steps

A learning plan’s steps are a heterogeneous list. Every step shares stepId, stepType, and label, and each concrete step type exposes an identifier for the content it points at:

CatalogProgramStepprogramKey

The program the step launches.

CatalogAssessmentStepassessmentId

The assessment the step launches.

CatalogWorkeraAssessmentStepdomainId

The Workera assessment domain.

CatalogApplicationStepapplicationId

The application the step launches.

CatalogSurveyStepsurveyId

The survey the step launches.

CatalogContainerStepchildren

A group of nested steps. Containers can nest, so recurse into children for each level you need to read.

Use inline fragments (... on CatalogProgramStep) to select the type-specific fields, and recurse into CatalogContainerStep.children to walk nested steps. Top-level stepId values are what you pass as the step query parameter when constructing learning plan URLs. A step nested inside a container is reached by passing the container’s stepId as step and the nested stepId as highlight.

Query
query GetCatalog($contractId: ID) {
  catalog(contractId: $contractId) {
    companyId
    learningPlans {
      id
      steps {
        stepId
        stepType
        label
        ... on CatalogProgramStep { programKey }
        ... on CatalogAssessmentStep { assessmentId }
        ... on CatalogWorkeraAssessmentStep { domainId }
        ... on CatalogApplicationStep { applicationId }
        ... on CatalogSurveyStep { surveyId }
        ... on CatalogContainerStep {
          children {
            stepId
            stepType
            label
            ... on CatalogProgramStep { programKey }
            ... on CatalogAssessmentStep { assessmentId }
            ... on CatalogWorkeraAssessmentStep { domainId }
            ... on CatalogApplicationStep { applicationId }
            ... on CatalogSurveyStep { surveyId }
            ... on CatalogContainerStep {
              children {
                stepId
                stepType
                label
                ... on CatalogProgramStep { programKey }
                ... on CatalogAssessmentStep { assessmentId }
                ... on CatalogWorkeraAssessmentStep { domainId }
                ... on CatalogApplicationStep { applicationId }
                ... on CatalogSurveyStep { surveyId }
              }
            }
          }
        }
      }
    }
  }
}
Response
{
  "data": {
    "catalog": {
      "companyId": "4821",
      "learningPlans": [
        {
          "id": "fd6f0490-2072-43b0-b1d0-7ee82fe96df2",
          "steps": [
            {
              "stepId": "2c0a4fe4-7687-43f9-b749-891e5c636a65",
              "stepType": "PROGRAM",
              "label": "Cloud Architecture",
              "programKey": "nd00113"
            },
            {
              "stepId": "8a386eac-5a18-4229-88a4-add7f1ee600f",
              "stepType": "CONTAINER",
              "label": "Foundations",
              "children": [
                {
                  "stepId": "b6b5e826-2f1a-4c3d-9e77-6f0d2a1b9c44",
                  "stepType": "ASSESSMENT",
                  "label": "Python Fundamentals Assessment",
                  "assessmentId": "87fac66e"
                },
                {
                  "stepId": "d1e2f3a4-5b6c-7d8e-9f01-234567890abc",
                  "stepType": "SURVEY",
                  "label": "Onboarding Survey",
                  "surveyId": "survey-1024"
                }
              ]
            }
          ]
        }
      ]
    }
  }
}

Program Contents

A program’s contents describes its classroom hierarchy. It is a union whose member matches the program’s type:

DEGREEDegreeContents

Parts, each holding modules, each holding lessons.

PARTPartContents

Modules, each holding lessons.

COURSECourseContents

Lessons, with no intervening parts or modules.

Select each member’s list with an inline fragment (... on DegreeContents), and use __typename to tell which one you received. A lesson that introduces a project exposes it as project; the project takes the title of its lesson, matching what learners see in the classroom. Only content from the program’s published release is included, and contents itself is null when the hierarchy is unavailable, for example when the program has no published release.

See Querying Program Contents for a walkthrough.

Query
query GetCatalog {
  catalog {
    programs {
      key
      type
      contents {
        __typename
        ... on DegreeContents {
          parts {
            key
            title
            isOptional
            isCareer
            modules { ...moduleFields }
          }
        }
        ... on PartContents {
          modules { ...moduleFields }
        }
        ... on CourseContents {
          lessons { ...lessonFields }
        }
      }
    }
  }
}

fragment lessonFields on CatalogLesson {
  key
  title
  duration
  project {
    key
    title
    duration
  }
}

fragment moduleFields on CatalogModule {
  key
  title
  lessons { ...lessonFields }
}
Response
{
  "data": {
    "catalog": {
      "programs": [
        {
          "key": "nd00113",
          "type": "DEGREE",
          "contents": {
            "__typename": "DegreeContents",
            "parts": [
              {
                "key": "part-cloud-foundations",
                "title": "Cloud Foundations",
                "isOptional": false,
                "isCareer": false,
                "modules": [
                  {
                    "key": "module-networking",
                    "title": "Networking Basics",
                    "lessons": [
                      {
                        "key": "lesson-vpc-design",
                        "title": "Design a Virtual Private Cloud",
                        "duration": "PT45M",
                        "project": {
                          "key": "project-vpc-design",
                          "title": "Design a Virtual Private Cloud",
                          "duration": "PT10H"
                        }
                      }
                    ]
                  }
                ]
              }
            ]
          }
        }
      ]
    }
  }
}