Java42 / google-api-java-client

Automatically exported from code.google.com/p/google-api-java-client
0 stars 0 forks source link

HttpError 400 in jobs.get(jobId,ProjectId) even with right values. #670

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
when I call jobs.get(jobId,ProjectID);
I get:
 "code" : 400,
  "errors" : [ {
    "domain" : "global",
    "message" : "Invalid project ID 'My_Project_ID:job_6c2e8cc358ad42d2ad55ef266d342b68'. Project IDs must contain 6-63 lowercase letters, digits, or dashes. IDs must start with a letter and may not end with a dash.",
    "reason" : "invalid"
  } ],
  "message" : "Invalid project ID 'My_Project_ID:job_6c2e8cc358ad42d2ad55ef266d342b68'. Project IDs must contain 6-63 lowercase letters, digits, or dashes. IDs must start with a letter and may not end with a dash."

(I switched projectId with "My_Project_ID")

If I use the exact projectID and jobID in the "try it" section in the google 
developer guide in here:
https://developers.google.com/bigquery/docs/reference/v2/jobs/get

I get the job back as expected!

If projectId or jobId wasn't right then it wouldn't have worked in the google 
developer site also.
What can cause this behavior?

Original issue reported on code.google.com by eladv...@gmail.com on 3 Dec 2012 at 3:49

GoogleCodeExporter commented 9 years ago
I tried switching jobId and ProjectID , still didn't work, Error message change 
a bit and now its talking about JobID but the combined string ProjectId+JobId 
remain the same:
{ 
"code" : 400, 
"errors" : [ { "domain" : "global", 
"message" : "Invalid job ID 
\"My_Project_ID:job_894b0d528b0748b6b5cd68d0363a2a2a\". Job IDs must be 
alphanumeric (plus underscores and dashes) and must be at most 1024 characters 
long.",
 "reason" : "invalid" 
}
 ], "message" : "Invalid job ID \"My_Project_ID:job_894b0d528b0748b6b5cd68d0363a2a2a\". Job IDs must be alphanumeric (plus underscores and dashes) and must be at most 1024 characters long." } 

Original comment by eladv...@gmail.com on 4 Dec 2012 at 10:41