Custom objects handbook Follow

Comments

13 comments

  • Avatar
    Mark DiValerio

    Can Custom Objects and Relationships be retrieved via the support app client? i.e. sidebar_client.get("relationships") or sidebar_client.request("/api/custom_resources/resources/{resource_id}/relationships/{relationship_type_key}")??

     

    Thanks,
    Mark DiValerio

  • Avatar
    Bryan Flynn

    Hi Mark. The interface to Custom Objects is only through REST APIs right now. There is a strong interest in having a tighter integration with the Apps framework, however, so keep an eye out in the future for changes such as this.

  • Avatar
    Joseph May

    Hi there Mark-

    As Bryan pointed out, a tighter integration with the apps framework is not available right now. That said, your second example would still work with the Zendesk Apps framework - the only option currently is using client.request().

    Regards,

    Joey

  • Avatar
    Ben Heiligenthal

    Is there a size limit for the data array for a job? I'm trying to bulk import ~4000 custom objects and I'm not sure if this can all be done in one job, or if there is a better way to bulk import custom objects other than via the API.

  • Avatar
    Bryan Flynn

    Hi Ben. The limit is a 1000. It's not documented right now but soon will be.

  • Avatar
    Ben Heiligenthal

    Thanks for the response Bryan. One more question, when inserting relationship records, can this be done with the external_ids of each object? Or does it have to be the ids generated from when created in zendesk?

  • Avatar
    Bryan Flynn

    Hi Ben. It's the Zendesk generated ID of the resource.

  • Avatar
    Ben Heiligenthal

    So there is no way to use the external_id? 

  • Avatar
    Bryan Flynn

    Can you give more details on your use case Ben?

    ID is the attribute that is guaranteed unique across all resource types. If you give more details maybe there's some approach that can get you what you're looking for.

  • Avatar
    Jason Martens

    Hi Ben, it sounds like you want to have external IDs in the source or target of a relationship, is that correct?

    If so, this is not something that you can do currently. The workaround is to create a relationship to an object, then get the external ID from that object. 

  • Avatar
    Ben Heiligenthal

    Jason,

    Yes, using the external_ids in the source and target was my intent. I can do it without using them, it just would have been a nice convenience. Thank you for the response

  • Avatar
    Ben Heiligenthal

    Deleted my previous comment. Figured out the links. Now I just have this question:

    How do I get more objects per page in a GET to get all of my objects of a certain type? What should the url look like?

  • Avatar
    Bryan Flynn

    Is this what you're looking for Ben?

    You can specify up to 1000 records per page using the per_page parameter:

    https://developer.zendesk.com/rest_api/docs/custom-objects-api/resources#parameters

    If listing object records by object type key, you can use the following optional query string parameters:

    Name Type Comment
    per_page string Number of object records per page from 1 to 1000

    Example:

    https://{subdomain}.zendesk.com/api/custom_resources/resources?type=product&per_page=100

Please sign in to leave a comment.

Powered by Zendesk