Print Events Storage (v1.0)

http://localhost:9130

Table of contents

Storage for print events

POST /print-events-storage/print-events-entry

save a print event log

POST /print-events-storage/print-events-entry
Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Print Events Request",
  "type": "object",
  "properties": {
    "requestIds": {
      "description": "List of request IDs",
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "string",
        "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
      }
    },
    "requesterId": {
      "description": "ID of the requester",
      "type": "string",
      "pattern": "^(?!\\s*$).+",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "uuid.schema"
    },
    "requesterName": {
      "description": "Name of the requester",
      "type": "string",
      "pattern": "^(?!\\s*$).+"
    },
    "printEventDate": {
      "description": "Date and time when the print command is executed",
      "type": "string",
      "format": "date-time"
    }
  },
  "required": [
    "requestIds",
    "requesterId",
    "requesterName",
    "printEventDate"
  ]
}

Response 201

All items have been successfully created or updated

Response 409

Optimistic locking version conflict

Body

Media type: text/plain

Type: any

Example:

Version error

Response 413

Payload too large

Body

Media type: text/plain

Type: any

Example:

Payload too large

Response 422

Unprocessable entity

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "id": "errors.schema",
  "description": "A set of errors",
  "type": "object",
  "properties": {
    "errors": {
      "description": "List of errors",
      "id": "errors",
      "type": "array",
      "items": {
        "type": "object",
        "$schema": "http://json-schema.org/draft-04/schema#",
        "id": "error.schema",
        "description": "An error",
        "properties": {
          "message": {
            "type": "string",
            "description": "Error message text"
          },
          "type": {
            "type": "string",
            "description": "Error message type"
          },
          "code": {
            "type": "string",
            "description": "Error message code"
          },
          "parameters": {
            "description": "Error message parameters",
            "$schema": "http://json-schema.org/draft-04/schema#",
            "id": "parameters.schema",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string"
                },
                "value": {
                  "type": "string"
                }
              }
            }
          }
        },
        "required": [
          "message"
        ]
      }
    },
    "total_records": {
      "description": "Total number of errors",
      "type": "integer"
    }
  }
}

Example:

{
  "errors": [
    {
      "message": "may not be null",
      "type": "1",
      "code": "-1",
      "parameters": [
        {
          "key": "moduleTo",
          "value": "null"
        }
      ]
    }
  ]
}

Response 500

Internal server error

Body

Media type: text/plain

Type: any

Example:

Internal server error

POST /print-events-storage/print-events-status

Fetch batch of print event details

POST /print-events-storage/print-events-status
Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Print Events Request",
  "type": "object",
  "properties": {
    "requestIds": {
      "description": "List of request IDs",
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "string",
        "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
      }
    }
  }
}

Response 200

Requests print event details are successfully retreived

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Collection of print events details",
  "type": "object",
  "properties": {
    "printEventsStatusResponses": {
      "description": "List of print events details",
      "id": "printEvents",
      "type": "array",
      "items": {
        "type": "object",
        "$schema": "http://json-schema.org/draft-04/schema#",
        "description": "Print events details",
        "properties": {
          "requestId": {
            "description": "ID of the request",
            "type": "string"
          },
          "requesterId": {
            "description": "ID of the requester",
            "type": "string"
          },
          "requesterName": {
            "description": "Name of the requester",
            "type": "string"
          },
          "count": {
            "description": "No of times the request is printed",
            "type": "integer"
          },
          "printEventDate": {
            "description": "Date and time when the print command is executed",
            "type": "string",
            "format": "date-time"
          }
        }
      }
    },
    "totalRecords": {
      "type": "integer"
    }
  },
  "required": [
    "printEventsStatusResponses",
    "totalRecords"
  ]
}

Response 422

Unprocessable entity

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "id": "errors.schema",
  "description": "A set of errors",
  "type": "object",
  "properties": {
    "errors": {
      "description": "List of errors",
      "id": "errors",
      "type": "array",
      "items": {
        "type": "object",
        "$schema": "http://json-schema.org/draft-04/schema#",
        "id": "error.schema",
        "description": "An error",
        "properties": {
          "message": {
            "type": "string",
            "description": "Error message text"
          },
          "type": {
            "type": "string",
            "description": "Error message type"
          },
          "code": {
            "type": "string",
            "description": "Error message code"
          },
          "parameters": {
            "description": "Error message parameters",
            "$schema": "http://json-schema.org/draft-04/schema#",
            "id": "parameters.schema",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string"
                },
                "value": {
                  "type": "string"
                }
              }
            }
          }
        },
        "required": [
          "message"
        ]
      }
    },
    "total_records": {
      "description": "Total number of errors",
      "type": "integer"
    }
  }
}

Example:

{
  "errors": [
    {
      "message": "may not be null",
      "type": "1",
      "code": "-1",
      "parameters": [
        {
          "key": "moduleTo",
          "value": "null"
        }
      ]
    }
  ]
}

Response 500

Internal server error

Body

Media type: text/plain

Type: any

Example:

Internal server error