Getting Available Resources

Swagger Documentation

To see what resources and authentication methods are available, you can retrieve the swagger documentation via 2 routes

On the server the documentation is located at

{{suitecrm.url}}/Api/docs/swagger/swagger.json

You can also retrieve the documentation via an API call:

GET {{suitecrm.url}}/Api/V8/meta/swagger.json

The swagger documentation is a JSON file that includes information on what the default API is capable of and how to structure an API call.

An example of one of the paths included is shown below.

  "paths": {
    "/module/{moduleName}/{id}": {
      "get": {
        "tags": [
          "Module"
        ],
        "description": "Returns a bean with the specific ID",
        "parameters": [
          {
            "name": "moduleName",
            "in": "path",
            "description": "Name of the module",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "Contacts"
          },
          {
            "name": "id",
            "in": "path",
            "description": "ID of the module",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "b13a39f8-1c24-c5d0-ba0d-5ab123d6e899"
          },
          {
            "name": "fields[Contacts]",
            "in": "query",
            "description": "Filtering attributes of the bean",
            "schema": {
              "type": "string"
            },
            "example": "name,account_type"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "BAD REQUEST"
          }
        },
        "security": [
          {
            "oauth2": []
          }
        ]
      },
    },
  }

This will tell you everything you need to know about how to structure the API Request. A description of the array can be found below.

path

The path or URI of this api request i.e. "{{suitecrm.url}}/module/{moduleName}/{id}"

get

The type of request e.g. GET/POST/PATCH

description

Lets you know what this request is for.

parameters

Lets you know what can be included in the request.

  • "name" is the name of the parameter or what it replaces in the path.

  • "in" lets you know where this parameter should go.

    • "path" means it replaces one of the varaiables in curly braces in the path.

    • "query" means it should be included in the body of the request as a parameter.

  • "required" lets you know if this parameter must be included for the API call to be successful.

  • "schema" describes the type/format of the parameter.

  • "example" provides an example of how the parameter is used in the API call.

responses

The http messages to expect with the API Response.

security

The required security for the API call.

Content is available under GNU Free Documentation License 1.3 or later unless otherwise noted.