Responses

Response bodies from the CodeGuard service are in JSON format, with a Content-Type: of application/json and UTF-8 character encoding.

Success Responses

The following status codes represent "success" conditions:

201 (Created)

A successful response will include a JSON document representing a resource.

HTTP/1.1 201 OK
        Content-Type: application/json
        Content-Length: 184
        Last-Modified: Fri, 01 Jun 2013 14:53:22 GMT

        {
            "type": "Example",
            "name": "Example Resource",
            "parent": {
                "type": "Root",
                "name": "(root)",
                "path": "/"
            },
            "path": "/example-resource"
        }
        

200 (OK)

A successful response will return a 200 status code.

HTTP/1.1 200 OK
        Content-Type: application/json
        Content-Length: 184
        Last-Modified: Fri, 01 Jun 2013 14:53:22 GMT
        

Error Responses

The following status codes represent failure states. In most cases a response body will be included with the following error document format:

{
            "error" : {
                "message" : "Invalid partner API key"
            }
        }
        

400 (Bad Request)

Indicates that the format of the request is invalid. This may be caused by missing or malformed required parameters.

403 (Forbidden)

Indicates that the requester does not have permission to access the requested resource. This could be caused by invalid or malformed authentication parameters.

404 (Not Found)

Indicates that a resource cannot be retrieved.

500 (Server Error)

This response indicates a failure in the API's application server. The developers will be notified.