HTTP response codes

HTTP response codes indicates the success or failure of an API Application Programming Interface; a set of clearly defined methods of communication between various software components. request. The response contains:

  • A response code and description.
  • Optional payload.

Some APIs have specific response codes. For details, see the API documentation

HTTP status code summary

Code

Description

Scenario

200

OK

Authorisation (Basic Auth) and Header parameters are correct

400

Mandatory header X-initiatingParticipantID is missing and / or

Mandatory header X-Market is missing

One of the following mandatory header parameter is missing:

  • X-initiatingParticipantID

  • X-Market

401

Unauthorised

The authorization credentials, username or password is invalid.

E-Hub also sends the payload {"Exception": "Unauthorised: Invalid Username or Password"}

403

Invalid Role

The participantId does not have access to the API. See TLS Certificates for details

404

Resource for the endpoint URI not found

The URI details are incorrect. See:

 

405

Method not allowed

The request method is invalid, e.g. GET instead of POST

413

Payload too large

Remove records from the payload and re-try

422

The Entity cannot be processed

The API content failed business validation rules. For detail see the validation message relevant to the API on the API Reference Guide catalogue.

429

Too many requests

Possible reasons:

  • The requests exceed the throttling limit of 1 request per second. Wait and retry the submission

  • Primary key violation is due to a back-end process error where the request slips through the throttling validation. Wait and retry the submission

500

Application unavailable

Possible reasons:

  • The Certificate or Key does not match

  • The AEMO Gateway is unavailable. Wait and retry the submission

502

Bad Gateway

The AEMO Gateway is unavailable. Wait and retry the submission

503

Exceeds Throttling Limits

Service request rejected based on policy violation

Response examples

Copy
HTTP/1.1 200 OK
 Content-Type: application/json
 Content-Length: nnn
 Date: Mon, 01 May 2017 18:00:00 GMT
 Connection: close
 {
"data": {
"MaxRecallTime": 506200,
"SuccessFlag": true,
"ResponseMessage": "Get Recall Plan action succeeded",
"RecallPlanList": [
{
"StationId": "TEST",
"OutagePlanId": "TEST_OUT1",
"Stage1Description": null,
"Stage2Description": null,
"DUID": "TEST1",
"MinimumStartDate": "2017-11-10T00:00:00",
"MaximumEndDate": "2017-11-11T00:00:00",
"VersionDateTime": "2017-11-16T18:20:12",
"Entries": []
}
]
}
}

Copy
HTTP/1.1 405 Method Not Allowed
Content-Length: nnn
Date: Mon, 01 May 2017 18:00:00 GMT
Connection: close
 {
"Exception": "Input request HTTP method is GET but operation /listRecallPlans accepts only: [POST]"
 }