Python-docs-samples: talent_v4beta1 ProfileServiceClient

Created on 26 May 2020  路  14Comments  路  Source: GoogleCloudPlatform/python-docs-samples

I would like to submit samples for the talent_v4beta1 ProfileServiceClient. However I do not seem to have privileges to test the api. How do I get access?

needs more info question

All 14 comments

@shezankazi Can you share what you did and how it failed? We're in a process of significant refactoring the test driver, and we'd like to support your use case too :)

Thanks for the quick reply. For instance when I run this code:

def create_sample_profile(candidate, project, tenant):
    client = talent_v4beta1.ProfileServiceClient()
    parent = client.tenant_path(project, tenant)

    skills = [
        {
            'display_name': "Java",
            'level': "SKILL_PROFICIENCY_LEVEL_UNSPECIFIED"
        },
        {
            'display_name': "Python",
            'level': "EXPERT"
        }
    ]

    profile = {
        'name': str(candidate),
        'external_id': str(candidate.id),
        'person_names': [
            {
                'formatted_name': "Max Mustermann",
                'structured_name': {
                    'given_name': "Max",
                    'family_name': "Mustermann",
                }
            }
        ],
        'addresses': [
            {
                'usage': "PERSONAL",
                'current': True,
                'unstructured_address': "Landsberger Stra脽e 154, 80339 M眉nchen, Deutschland"
            }
        ],
        'employment_records': [],
        'education_records': [],
        'skills': skills

    }
    response = client.create_profile(parent, profile)
    print("Created Profile")
    import pdb; pdb.set_trace()

I receive an error 429 Resource exhausted. It seems my account does not have quotas for the profile api.

This is the entire error, which basically applies for all calls to the profile endpoint:

GET https://jobs.googleapis.com/v4beta1/{parent=projects/*/tenants/*}/profiles

And the response is:

{
  "error": {
    "code": 429,
    "message": "Quota exceeded for quota metric 'quota metric that handles profile read requests' and limit 'quota metric that handles profile read requests per minute' of service 'jobs.googleapis.com' for consumer 'project_number:292824132082'.",
    "status": "RESOURCE_EXHAUSTED",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.Help",
        "links": [
          {
            "description": "Google developer console API key",
            "url": "https://console.developers.google.com/project/292824132082/apiui/credential"
          }
        ]
      }
    ]
  }
}

Any news on this?

@shezankazi

Sorry for the late reply. How do you authenticate the call?
I'll try to reproduce your problem.

I tried to run the tests in jobs/v4beta1 directory with my personal Cloud project.

Some tests have passed for me. In other words, I can not reproduce your problem.

@shezankazi Did you enable billing on the Cloud Project?

@shezankazi Did you enable billing on the Cloud Project?

Billing is enabled.

I tried to run the tests in jobs/v4beta1 directory with my personal Cloud project.

Some tests have passed for me. In other words, I can not reproduce your problem.

These also work for me. However, when I try calling the /profiles endpoint, I am not authorized. Therefore, I assume I need access to this beta functionality.

Please refer to this, if it is unclear what I mean by /profilesendpoint.
-> https://cloud.google.com/talent-solution/job-search/docs/reference/rpc/google.cloud.talent.v4beta1?hl=de#profileservice

My quotas in cloud console also do not include any profiles quota.

@shezankazi Oh I see. Sorry about the misunderstanding here. I'll try to reproduce it.

@shezankazi I'm trying to run your code, but how do you initialize candidate?

@shezankazi Nevermind, I got the same error.

I'll ask the jobs API team about this.

@shezankazi Sorry for the late reply.

It turned out that the profiles endpoint was released as closed preview, and currently we don't accept new users.

So, it's an intended behavior. Sorry for the confusion.

Thanks for following up on this. Very unfortunate though. Is there any roadmap for this feature?

Was this page helpful?
0 / 5 - 0 ratings