Skip to content
Discussion options

You must be logged in to vote

Ultimately I need to be able to get all custom fields and their values for a site when given the ID of that site

It's much simpler in modern versions of Netbox: all you need is

select id,custom_field_data from dcim_site where id=$1`

My question is what is the object_type_id? What table holds more info about the object_types?

FWIW, that's in table django_content_type. You might need to use it when dealing with generic foreign keys, with a pair of (assigned_object_type_id, assigned_object_id)

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@twiclo
Comment options

@candlerb
Comment options

@twiclo
Comment options

@candlerb
Comment options

Answer selected by twiclo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants