Get meta{entity} endpoint

Forum for users and developers of Bullhorn's API service.

Moderators: StaffingSupport, s.emmons, BullhornSupport

Post Reply
Taniya
User
Posts: 2
Joined: Mon Dec 07, 2020 9:59 am

Get meta{entity} endpoint

Post by Taniya »

Hi
I am trying to make a request to the `Get meta{entity} endpoint. I am having trouble making a successful request using the `layout` parameter.
http://bullhorn.github.io/rest-api-docs ... eta-entity

1. I have created a layout from the UI called `test`.
Screenshot 2020-12-07 at 14.09.36.png
2. Made a request using postman

Code: Select all

 
 curl --location --request GET 'https://<DOMAIN>.bullhornstaffing.com/rest-services/5ebgp0/meta/Appointment?BhRestToken=<TOKEN>&layout=test'
3. Response

Code: Select all

{
    "errorMessage": "An internal error has occurred",
    "errorMessageKey": "errors.internalError"
}
I was able to make a successful request by sending the `field` parameter

What are the valid test data for `layout`?

Many thanks

Taniya
khenle
User
Posts: 17
Joined: Wed Feb 26, 2020 12:31 pm

Re: Get meta{entity} endpoint

Post by khenle »

Hi,

Layout in this case is referring to the View Layout configuration for the specific entity you are using.

I would suggest first running a call using fields=* to return all of the values that are valid for use in "layout="

You can do this by running a call similar to this: rest-services/e999/meta/Candidate?fields=*

The "names" values that return from this call can then be swapped into layout=values. This will help to determine if the value you are setting for layout is valid or not and whether it is causing this error.
Taniya
User
Posts: 2
Joined: Mon Dec 07, 2020 9:59 am

Re: Get meta{entity} endpoint

Post by Taniya »

Thank you for the reply. I am still having issues trying to send a successful request with layouts.

1. Get meta information endpoint with wild card returns this response
`meta/Candidate?fields=*`

Code: Select all

{
    "entity": "Candidate",
    "entityMetaUrl": "...*",
    "label": "Candidate",
    "dateLastModified": "",
    "fields": [
      {
        "name": "id",
        "type": "ID",
        "dataType": "Integer"
      },
      {
        "name": "activePlacements",
        ....
2. Then i sent a request using `/meta/Candidate?layout=id` using one of the values from the `name` returned in the previous request. This request returns a 500 status code

Code: Select all

"response": {
      "statusCode": 500,
      "body": {
        "errorMessage": "An internal error has occurred",
        "errorMessageKey": "errors.internalError"
      }
Not sure whether the values returned from the names can be used in the layout. Any other suggestions?

Many thanks
Taniya
khenle
User
Posts: 17
Joined: Wed Feb 26, 2020 12:31 pm

Re: Get meta{entity} endpoint

Post by khenle »

Hi Taniya,

The layout is intended to return the View Layout configuration for the entity. So for example, layout=ListRow or layout=ProfileRightSideBar could be used to return that information for the Candidate entity.

Can you try a call similar to the following and let me know if that still returns an error for you?

GET rest-services/[redacted]/meta/Candidate?layout=ListRow&BhRestToken[redacted]
Post Reply