I’m doing interviews for companies that would involve API integrations. I’ve done a couple now where I was given some general API information (some intentionally unclear, some more clear) and I felt I didn’t do well. Mainly I was nervous, and felt very pressured just to understand how the different parts of the APIs interact with each other and should be interacted with. This is despite doing this for work and myself not feeling as nervous doing more common coding tests which I don’t do as much at work(thanks to doing examples on hackerrank, Leetcode helping me feel more comfortable).

So what are the resources I should leverage to practice API integrations? How should I go about practicing? Especially considering that I do need to perform in a certain way during interviews.

  • sloppy_diffuser@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    2
    ·
    3 months ago

    Sounds like they are testing your ability to read and digest APIs which makes sense for the role.

    What are all the HTTP verbs for? What can your infer from the paths of each endpoint? Can you read the schema for each of the inputs and outputs?

    Making an API and back end can teach about API design. How do you make relations? What do you do if you synchronously need to update two resources? What if your resource is an action?

    Another approach is to read and try to consume some APIs. The more you practice reading the better you will be at it.

    Query releases on GitHub, song information on Spotify, or the weather. Make a crud discord or slack bot that intercepts commands and queries another API to send a response (e.g., /weather). Look into webhooks and callbacks. Make a song play via Spotify every time you push to GitHub.

    I use GitLab’s webhooks when an issue or merge request is modified. The webhook callback is GitLab’s pipeline trigger API. I don’t even need a webserver. The pipeline checks that the updated issue/merge request came from a user on an issue that the renovate bot opened. If true, it runs the renovate job (dependency upgrades) via an API call. This makes renovate work like GitHub where there are checkboxes that trigger actions.

    The ability to read, understand, and integrate with APIs seems to be the skill they want, so I’d practice that skill.

    • Habahnow@sh.itjust.worksOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      3 months ago

      Thanks I appreciate the advice. I’ll look into those questions you’ve asked as some I can’t answer confidently. The first 3 are more or less questions I have been asked in interviews.