models

GET /projects/{projectsId}/datasets/{datasetsId}/models/{modelsId}

Changed on

Gets the specified model resource by model ID. # IAM Permissions Requires the bigquery.models.getMetadata permission on the model.

Request

  • Base URL
    https://bigquery.googleapis.com/bigquery/v2
  • Auth
    • OAuth 2 and OAuth 2
      Implicit: https://accounts.google.com/o/oauth2/auth
      Scopes: https://www.googleapis.com/auth/bigquery
      Authorization code: https://accounts.google.com/o/oauth2/auth
      Token URL: https://accounts.google.com/o/oauth2/token scopes: https://www.googleapis.com/auth/bigquery
    • or OAuth 2 and OAuth 2
      Implicit: https://accounts.google.com/o/oauth2/auth
      Scopes: https://www.googleapis.com/auth/cloud-platform
      Authorization code: https://accounts.google.com/o/oauth2/auth
      Token URL: https://accounts.google.com/o/oauth2/token scopes: https://www.googleapis.com/auth/cloud-platform
    • or OAuth 2 and OAuth 2
      Implicit: https://accounts.google.com/o/oauth2/auth
      Scopes: https://www.googleapis.com/auth/cloud-platform.read-only
      Authorization code: https://accounts.google.com/o/oauth2/auth
      Token URL: https://accounts.google.com/o/oauth2/token scopes: https://www.googleapis.com/auth/cloud-platform.read-only

Path parameters

projectsIdstring required
datasetsIdstring required
modelsIdstring required

Response

Successful response

bestTrialIdstring int64

The best trial_id across all training runs.

creationTimestring int64

Output only. The time when this model was created, in millisecs since the epoch.

defaultTrialIdstring int64

Output only. The default trial_id to use in TVFs when the trial_id is not passed in. For single-objective hyperparameter tuning models, this is the best trial ID. For multi-objective hyperparameter tuning models, this is the smallest trial ID among all Pareto optimal trials.

descriptionstring

Optional. A user-friendly description of this model.

etagstring

Output only. A hash of this resource.

expirationTimestring int64

Optional. The time when this model expires, in milliseconds since the epoch. If not present, the model will persist indefinitely. Expired models will be deleted and their storage reclaimed. The defaultTableExpirationMs property of the encapsulating dataset can be used to set a default expirationTime on newly created models.

friendlyNamestring

Optional. A descriptive name for this model.

labelsobject

The labels associated with this model. You can use these to organize and group your models. Label keys and values can be no longer than 63 characters, can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter and each label in the list must have a different key.

lastModifiedTimestring int64

Output only. The time when this model was last modified, in millisecs since the epoch.

locationstring

Output only. The geographic location where the model resides. This value is inherited from the dataset.

modelType'MODEL_TYPE_UNSPECIFIED' | 'LINEAR_REGRESSION' | 'LOGISTIC_REGRESSION' | 'KMEANS' | 'MATRIX_FACTORIZATION' | 'DNN_CLASSIFIER' | 'TENSORFLOW' | 'DNN_REGRESSOR' | 'XGBOOST' | 'BOOSTED_TREE_REGRESSOR' | 'BOOSTED_TREE_CLASSIFIER' | 'ARIMA' | 'AUTOML_REGRESSOR' | 'AUTOML_CLASSIFIER' | 'PCA' | 'DNN_LINEAR_COMBINED_CLASSIFIER' | 'DNN_LINEAR_COMBINED_REGRESSOR' | 'AUTOENCODER' | 'ARIMA_PLUS' | 'ARIMA_PLUS_XREG' | 'RANDOM_FOREST_REGRESSOR' | 'RANDOM_FOREST_CLASSIFIER' | 'TENSORFLOW_LITE' | 'ONNX' | 'TRANSFORM_ONLY' | 'CONTRIBUTION_ANALYSIS'

Output only. Type of the model resource.

optimalTrialIdsstring[]

Output only. For single-objective hyperparameter tuning models, it only contains the best trial. For multi-objective hyperparameter tuning models, it contains all Pareto optimal trials sorted by trial_id.

Changes

    • info

      the security scope https://www.googleapis.com/auth/bigquery was added to the endpoint's security scheme Oauth2

    • info

      the security scope https://www.googleapis.com/auth/bigquery was added to the endpoint's security scheme Oauth2c

    • info

      the security scope https://www.googleapis.com/auth/cloud-platform.read-only was removed from the endpoint's security scheme Oauth2

    • info

      the security scope https://www.googleapis.com/auth/cloud-platform.read-only was removed from the endpoint's security scheme Oauth2c

    • info

      the security scope https://www.googleapis.com/auth/bigquery was added to the endpoint's security scheme Oauth2

    • info

      the security scope https://www.googleapis.com/auth/bigquery was added to the endpoint's security scheme Oauth2c

    • info

      the security scope https://www.googleapis.com/auth/cloud-platform.read-only was removed from the endpoint's security scheme Oauth2

    • info

      the security scope https://www.googleapis.com/auth/cloud-platform.read-only was removed from the endpoint's security scheme Oauth2c