A data scientist wants to retrieve a specific version of a registered model from SAS Model Manager via the SAS Viya REST API. Which resource path is correct?
Select an answer to reveal the explanation.
Short Explanation
When you want one particular version of a registered model, you have to ask the model repository for it by name and by version. That's GET /modelRepository/models/{modelId}/versions/{versionId}: the modelRepository root gets you to SAS Model Manager's registry, and the versions segment picks the exact version you want. The other paths either use the wrong service root or point at CAS sessions and pipelines instead of the registry.
Full Explanation
SAS Model Manager exposes registered models through the Model Repository REST API, whose service root is /modelRepository. Under that root, /models/{modelId} addresses a single registered model, and appending /versions/{versionId} returns a specific model version, documented as getting a model version or model. The same service also offers /models/{modelId}/history/{versionId} for reading a version from the model history, which is the replacement for older version paths. GET /models/models/{modelId}/versions/{versionId} is wrong because it uses a service root that is not the Model Manager repository, even though the tail of the path looks familiar. GET /cas/sessions/{sessionId}/models is wrong because the CAS REST interface manages analytic sessions and in-memory tables, not the governed model registry. GET /mlPipeline/pipelines/{pipelineId}/models is wrong because Model Studio pipeline resources describe pipeline projects, not registered model versions. On the exam, watch for a path that stops at /models/{modelId}, because that returns the model itself rather than a named version. To check in practice, list /modelRepository/models/{modelId}/versions first, copy a version ID from the response, then request it directly.