Imports
Imports
Imports in Prism — Micro Go reference.
Reference for Go SDK 0.8.0.
Release source · Setup and client configuration
Get
GET /v2/prism/{teamId}/imports/{jobId}
client.Prism.Imports.Get(ctx context.Context, jobID string, query micro.PrismImportGetParams) (*micro.PrismImportGetResponse, error)Poll the status of an async import. Sync imports complete in the original response and don't appear here. Async jobs are retained for 7 days. Returns 404 once the job has expired.
Parameter and response types
These declarations show the request parameters and response shapes used by the methods above.
PrismImportGetResponse
type PrismImportGetResponse struct {
// Null for sync imports (results inlined). Set for async imports.
JobID string `json:"job_id" api:"required,nullable"`
Status PrismImportGetResponseStatus `json:"status" api:"required"`
// Total number of rows in the import.
Total int64 `json:"total" api:"required"`
CreatedAt time.Time `json:"created_at" format:"date-time"`
// Set when status=failed; describes the job-level failure (not per-row).
Error PrismImportGetResponseError `json:"error"`
ExpiresAt time.Time `json:"expires_at" format:"date-time"`
Failed int64 `json:"failed"`
// Rows that have been attempted (succeeded + failed).
Processed int64 `json:"processed"`
// Per-row outcomes. Always present for sync imports; populated for async imports
// once the job reaches `complete`.
Results []PrismImportGetResponseResult `json:"results"`
Succeeded int64 `json:"succeeded"`
UpdatedAt time.Time `json:"updated_at" format:"date-time"`
JSON prismImportGetResponseJSON `json:"-"`
}PrismImportGetParams
type PrismImportGetParams struct {
// Use [option.WithTeamID] on the client to set a global default for this field.
TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
}PrismImportGetResponseStatus
type PrismImportGetResponseStatus stringError
type Error = apierror.ErrorPrismImportGetResponseError
type PrismImportGetResponseError struct {
Code string `json:"code"`
Message string `json:"message"`
JSON prismImportGetResponseErrorJSON `json:"-"`
}PrismImportGetResponseResult
type PrismImportGetResponseResult struct {
ID string `json:"id" api:"nullable" format:"uuid"`
Created bool `json:"created"`
Error PrismImportGetResponseResultsError `json:"error"`
// True if the row matched an existing record via the dedupe key.
Existing bool `json:"existing"`
JSON prismImportGetResponseResultJSON `json:"-"`
}PrismImportGetResponseResultsError
type PrismImportGetResponseResultsError struct {
Code string `json:"code"`
Message string `json:"message"`
JSON prismImportGetResponseResultsErrorJSON `json:"-"`
}