ApiDoc demo

A sample demo for ApiDoc

hello
  • Customers

    Manage customers
    • Get

      Diff
      • v1.0
      • v2.0
      no implementation for this version
      Retrieve properties of a specific customer
      Request:
      Resource:
      http://api.acme.com/{version}/customers/{customer_id}
      URI Parameters:
      Parameter Type Optional Description
      version Version Api version
      customer_id integer Customer identifier
      Response:
      Body:
      {
      "Customer": Customer
      }
      Codes:
      Code Message Description
      404 Customer not found Customer does not exists
      Sample:
      Request:
      GET /v1.0/customers/42 HTTP/1.1 Content-Type: application/json; charset=utf-8
      Response:
      HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "Customer": { "id": 42, "name": "my_name", "users": [ { "email": "my_email", "id": 42, "name": "my_name" }, { "email": "my_email", "id": 42, "name": "my_name" } ] } }
    • List

      Diff
      • v1.0
      • v2.0
      no implementation for this version
      List customers
      Request:
      Resource:
      http://api.acme.com/{version}/customers
      URI Parameters:
      Parameter Type Optional Description
      version Version Api version
      Response:
      Body:
      {
      "Customers": [
      {
      "id": integer, Object identifier
      "name": string, Name of the object
      "next": string, Link to the next element
      "previous": string Link to the previous element
      }
      ]
      }
      Sample:
      Request:
      GET /v1.0/customers HTTP/1.1 Content-Type: application/json; charset=utf-8
      Response:
      HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "Customers": [ { "id": 42, "name": "my_name" }, { "id": 42, "name": "my_name" } ] }
      Sample:
      Request:
      GET /v1.0/customers HTTP/1.1 Content-Type: application/json; charset=utf-8
      Response:
      HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "Customers": [ { "id": 42, "name": "my_name", "next": "my_next", "previous": "my_previous" }, { "id": 42, "name": "my_name", "next": "my_next", "previous": "my_previous" } ] }
    • UserAdd

      Diff
      • v1.0
      • v2.0
      no implementation for this version
      Add an existing unser in a customer
      Request:
      Resource:
      http://api.acme.com/{version}/customers/{customer_id}/users
      URI Parameters:
      Parameter Type Optional Description
      version Version Api version
      customer_id integer Customer identifier
      Body:
      {
      "id": integer User identifier
      }
      Response:
      Body:
      {
      "Customer": Customer
      }
      Codes:
      Code Message Description
      403 Forbidden User can not be adding to this customer
      404 Customer not found Customer does not exists
      Sample:
      Request:
      POST /v1.0/customers/42/users HTTP/1.1 Content-Type: application/json; charset=utf-8 { "id": 42 }
      Response:
      HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "Customer": { "id": 42, "name": "my_name", "users": [ { "email": "my_email", "id": 42, "name": "my_name" }, { "email": "my_email", "id": 42, "name": "my_name" } ] } }
  • Users

    Manage user and authentication
    • Create

      Diff
      • v1.0
      • v2.0
      no implementation for this version
      Create a nex User
      Request:
      Resource:
      http://api.acme.com/{version}/users
      URI Parameters:
      Parameter Type Optional Description
      version Version Api version
      Body:
      {
      "user": User
      }
      Response:
      Body:
      {
      "User": User
      }
      Codes:
      Code Message Description
      403 Forbidden User can not be adding to this customer
      404 Customer not found Customer does not exists
      Sample:
      Request:
      POST /v1.0/users HTTP/1.1 Content-Type: application/json; charset=utf-8 { "user": { "email": "my_email", "id": 42, "name": "my_name", "phone": "my_phone" } }
      Response:
      HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "User": { "email": "my_email", "id": 42, "name": "my_name", "phone": "my_phone" } }
    • Get

      Diff
      • v1.0
      • v2.0
      no implementation for this version
      Retrieve properties of a specific user
      Request:
      Resource:
      http://api.acme.com/{version}/users/{user_id}
      URI Parameters:
      Parameter Type Optional Description
      version Version Api version
      user_id integer user identifier
      Response:
      Body:
      {
      "User": User
      }
      Codes:
      Code Message Description
      404 User not found User does not exists
      Sample:
      Request:
      GET /v1.0/users/42 HTTP/1.1 Content-Type: application/json; charset=utf-8
      Response:
      HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "User": { "email": "my_email", "id": 42, "name": "my_name" } }
    • List

      Diff
      • v1.0
      • v2.0
      no implementation for this version
      List users
      Request:
      Resource:
      http://api.acme.com/{version}/users
      URI Parameters:
      Parameter Type Optional Description
      version Version Api version
      Response:
      Body:
      {
      "Users": [
      {
      "id": integer, Object identifier
      "name": string, Name of the object
      "next": string, Link to the next element
      "previous": string Link to the previous element
      }
      ]
      }
      Sample:
      Request:
      GET /v1.0/users HTTP/1.1 Content-Type: application/json; charset=utf-8
      Response:
      HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "Users": [ { "id": 42, "name": "my_name" }, { "id": 42, "name": "my_name" } ] }
      Sample:
      Request:
      GET /v1.0/users HTTP/1.1 Content-Type: application/json; charset=utf-8
      Response:
      HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "Users": [ { "id": 42, "name": "my_name", "next": "my_next", "previous": "my_previous" }, { "id": 42, "name": "my_name", "next": "my_next", "previous": "my_previous" } ] }
    • Customer

      Diff
      • v1.0
      • v2.0
      no implementation for this version
      A customer
      Presentation:
      {
      "id": integer, Customer identifier
      "name": string, Name of the customer
      "users": [ List of users
      User
      ]
      }
      Formats:
      Sample:
      { "id": 42, "name": "my_name", "users": [ { "email": "my_email", "id": 42, "name": "my_name" }, { "email": "my_email", "id": 42, "name": "my_name" } ] }
    • User

      Diff
      • v1.0
      • v2.0
      no implementation for this version
      A user
      Presentation:
      {
      "email": string, Email address of the user
      "id": integer, User identifier
      "name": string, Name of the user
      "phone": string User's phone number
      }
      Formats:
      Sample:
      { "email": "my_email", "id": 42, "name": "my_name" }
      Formats:
      Sample:
      { "email": "my_email", "id": 42, "name": "my_name", "phone": "my_phone" }
    • Version

      Diff
      • v1.0
      • v2.0
      no implementation for this version
      A version
      Presentation:
      string
      Formats:
      Pretty Print:
      VN.N
      Advanced:
      V\d+\.\d+
      Sample:
      "v1.0"