IP Library Granted Patent US 10,177,996
Granted Patent B2
US 10,177,996 · App. 15/484,009 · Granted Jan 8, 2019

System and method for validating documentation of representational state transfer (REST) services

Inventors: Jorge Luis Williams (San Antonio, TX); David Cramer (San Antonio, TX)
Assignee: Rackspace US, Inc.
H04L41/5077H04L43/50H04L67/02
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,177,996
App. No.
15/484,009
Granted
Jan 8, 2019
Kind
B2
Abstract

A validation tool is provided for a representational state transfer (REST) service. In one embodiment, a method for validating documentation of a REST service includes including detecting one or more messages for a REST service by a validator, wherein the one or more messages are intercepted for the REST service, translating documentation of the REST service, by the validator, into a representation of an automaton, and validating the one or more messages by the validator based on the automaton, wherein validation of the messages determines conformance of the REST service to the documentation of the REST service.

Claims (33)

1. A method for validating documentation of a representational state transfer (REST) service to ensure that the documentation accurately matches an REST implementation, the method comprising: receiving, by a validator, one or more messages describing a REST application programming interface (API); translating, by the validator, the description of the REST API into a machine representation of a corresponding REST service, wherein the machine representation includes an automaton, wherein the machine representation maps an internal state and one or more inputs into an internal state transition, and wherein one or more states are associated with API responses; initializing a current state for machine representation of the REST service; receiving, by the validator, an API message; evaluating the API message by the machine representation, wherein evaluating the API message includes: identifying one or more transitions within the machine representation of the REST service; executing the one or more identified transitions resulting in a new state; responding to the API message according to the new state; and executing any automatic transitions identified for the new state; and wherein a first API message conforming to the documentation of the REST service results in the transition to a non-error state, and wherein a second API message that does not conform to the documentation results in the transition to an error state; categorizing the second API message in accordance with a first error code that is expected to be generated by the REST service; receiving a first API response from the REST service in response to processing the second API message; and verifying whether the first error code matches a second error code in the first API response.

2. The method of claim 1 , wherein the validator is provided with capabilities based on authorization of a user.

3. The method of claim 2 , wherein a first set of users are authorized to access a first part of the REST API, and

a second set of users are authorized to access a second part of the REST API.

4. The method of claim 1 , wherein the validator provides log information about stages of the REST API that are visited.

5. The method of claim 4 , further comprising:

determining, using the log information, one or more parts of the REST API are most frequently accessed by users.

6. The method of claim 1 , wherein the translating, by the validator, the description of the REST API into the machine representation of a corresponding REST service includes:

compressing redundant states in the machine representation into a single state.

7. The method of claim 1 , wherein the REST API is described using a web application description language (WADL) in a machine readable format.

8. The method of claim 1 , wherein the translating the description of the REST API into a machine representation of a corresponding REST service includes:

parsing the description;

validating the description against a schema; and

normalizing the description.

9. The method of claim 8 , wherein the schema is a WADL schema.

10. The method of claim 1 , wherein the evaluating the API message is performed as a preprocessing step.

11. A non-transitory computer-accessible storage medium storing program instructions that when executed by a computer cause the computer to implement a representational state transfer (REST) service validator to ensure that a documentation of the REST service accurately matches the implementation configured to: receiving one or more messages describing a REST application programming interface (API); translating the description of the REST API into a machine representation of a corresponding REST service, wherein the machine representation includes an automaton including a state machine that transitions from an initial start state to other states based on one or more current inputs, wherein the machine representation maps an internal state and one or more inputs into an internal state transition, and wherein one or more states are associated with API responses; receiving an API message; evaluating the API message by the machine representation, wherein evaluating the API message includes: identifying one or more transitions within the machine representation of the REST service; executing the one or more identified transitions resulting in a new state; responding to the API message according to the new state; and executing any automatic transitions identified for the new state; wherein a first API message conforming to the documentation of the REST service results in the transition to a non-error state, and wherein a second API message that does not conform to the documentation results in the transition to an error state; categorizing the second API message in accordance with a first error code that is expected to be generated by the REST service; receiving a first API response from the REST service in response to processing the second API message; and verifying whether the first error code matches a second error code in the first API response.

12. The non-transitory computer-accessible storage medium of claim 11 , wherein REST service is provided with capabilities based on authorization of a user.

13. The non-transitory computer-accessible storage medium of claim 12 , wherein a first set of users are authorized to access a first part of the REST API, and

a second set of users are authorized to access a second part of the REST API.

14. The non-transitory computer-accessible storage medium of claim 11 , wherein the REST service validator is configured to:

provide log information about stages of the REST API that are visited.

15. The non-transitory computer-accessible storage medium of claim 14 , wherein the REST service validator is configured to:

determining, using the log information, one or more parts of the REST API are most frequently accessed by users.

16. The non-transitory computer-accessible storage medium of claim 11 , wherein the REST service validator is configured to:

compressing redundant states in the machine representation into a single state.

17. The non-transitory computer-accessible storage medium of claim 11 , wherein the REST API is described using a web application description language (WADL) in a machine readable format.

18. The non-transitory computer-accessible storage medium of claim 11 , wherein the REST service validator is configured to:

parsing the description;

validating the description against a schema; and

normalizing the description.

19. The non-transitory computer-accessible storage medium of claim 18 , wherein the schema is a WADL schema.

20. The non-transitory computer-accessible storage medium of claim 11 , wherein the evaluating the API message is performed as a preprocessing step.

Assignments (2)
SECURITY INTEREST Recorded Apr 17, 2018
From: RACKSPACE US, INC.
To: CITIBANK, N.A.
Reel/Frame 045562/0371 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 6, 2017
From: WILLIAMS, JORGE LUIS; CRAMER, DAVID
To: RACKSPACE US, INC.
Reel/Frame 043808/0485 →
Continuity (3)
Continuation 14013930 · Aug 29, 2013
Provisional Application 61695728 · Aug 31, 2012
Related Publication 20170279691A1 · Sep 28, 2017
Cited By (1)
US 12,375,369