Tips for working with APIs

aatroxdell

New Member
Nov 20, 2024
1
0
1
The following tips will help you be successful when working with APIs.

  • When you call the endpoint through GET, you'll get a list of all available APIs.
  • When you call the endpoint through GET with $metadata, you'll get a list of all available APIs with their metadata.
  • When you call the endpoint through GET with $filter, you can use the OData filter expressions.
  • Each resource is uniquely identified through an ID.
    JSONCopy

    {
    "@odata.context": "<endpoint>/$metadata#companies",
    "value": [
    {
    "id": "bb6d48b6-c7b2-4a38-9a93-ad5506407f12",
    "systemVersion": "18453",
    "name": "CRONUS USA, Inc.",
    "displayName": "CRONUS USA, Inc.",
    "businessProfileId": ""
    }
    ]
    }

  • The resource ID must be provided in the URL when you are trying to read or modify a resource or any of its children. The ID is provided in parentheses () after the API endpoint. For example, to get the CRONUS USA, Inc. company details, you must call by using the following logic:
    <endpoint>/companies(bb6d48b6-c7b2-4a38-9a93-ad5506407f12)/
  • All resources live in the context of a parent company, which means that the company ID must be provided in the URL for all resource API calls. For example, to get all customers in the CRONUS USA, Inc. company, you would call by using the following logic:
    <endpoint>/companies(bb6d48b6-c7b2-4a38-9a93-ad5506407f12)/customers

    data center training courses malaysia
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!