Resource URL
| Type | URL and Format |
|---|---|
| GET | https://public-api.wordpress.com/rest/v1/test/$ID |
Method Parameters
| Parameter | Type | Description |
|---|---|---|
| $ID | (int) | An arbitrary integer |
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| http_envelope | (bool) |
|
| pretty | (bool) |
|
| callback | (string) | An optional JSONP callback function. |
| id | (int) | Another arbitrary integer |
| default_string | (string) | Default: 'default'. |
| default_int | (int) | Default: 100. |
| boolean_whitelist_defaults_to_false | (bool) |
|
| boolean_whitelist_defaults_to_true | (bool) |
|
| string_whitelist_defaults_to_foo | (string) |
|
| url | (url) | |
| datetime | (iso 8601 datetime) |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| method_id_matches_query_id | (bool) | Whether the arbitrary integer in the path matches the arbitrary integer in the query string. |
| method_id | (int) | |
| id | (int) | Another arbitrary integer |
| default_string | (string) | |
| default_int | (int) | |
| boolean_whitelist_defaults_to_false | (bool) | |
| boolean_whitelist_defaults_to_true | (bool) | |
| string_whitelist_defaults_to_foo | (string) | |
| url | (url) | |
| datetime | (iso 8601 datetime) |
Example
cURL
curl 'https://public-api.wordpress.com/rest/v1/test/123?pretty=1'
PHP
<?php
$options = array (
'http' =>
array (
'ignore_errors' => true,
),
);
$context = stream_context_create( $options );
$response = file_get_contents(
'https://public-api.wordpress.com/rest/v1/test/123?pretty=1',
false,
$context
);
$response = json_decode( $response );
?>
Response Body
{
"method_id_matches_query_id": false,
"method_id": 123,
"id": null,
"default_string": "default",
"default_int": 100,
"boolean_whitelist_defaults_to_false": false,
"boolean_whitelist_defaults_to_true": true,
"string_whitelist_defaults_to_foo": "foo",
"url": null,
"datetime": "2013-05-21T03:21:10+00:00"
}