Skip to content

Instantly share code, notes, and snippets.

@sc0ttkclark
Created March 21, 2020 21:05
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sc0ttkclark/d67b60c6bce96c13e7a617f99f7933c1 to your computer and use it in GitHub Desktop.
Save sc0ttkclark/d67b60c6bce96c13e7a617f99f7933c1 to your computer and use it in GitHub Desktop.
{
"namespace": "pods/v1",
"routes": {
"/pods/v1": {
"namespace": "pods/v1",
"methods": [
"GET"
],
"endpoints": [
{
"methods": [
"GET"
],
"args": {
"namespace": {
"required": false,
"default": "pods/v1"
},
"context": {
"required": false,
"default": "view"
}
}
}
],
"_links": {
"self": [
{
"href": "https://test.pods.dev/wp-json/pods/v1"
}
]
}
},
"/pods/v1/doc": {
"namespace": "pods/v1",
"methods": [
"GET"
],
"endpoints": [
{
"methods": [
"GET"
],
"args": []
}
],
"_links": {
"self": [
{
"href": "https://test.pods.dev/wp-json/pods/v1/doc"
}
]
}
},
"/pods/v1/pods": {
"namespace": "pods/v1",
"methods": [
"GET",
"POST"
],
"endpoints": [
{
"methods": [
"GET"
],
"args": {
"return_type": {
"required": false,
"default": "full",
"enum": [
"full",
"names",
"names_ids",
"ids",
"key_names",
"count"
],
"description": "The type of data to return.",
"type": "string"
},
"types": {
"required": false,
"description": "A list of types to filter by.",
"items": {
"type": "string"
}
},
"ids": {
"required": false,
"description": "A list of IDs to filter by.",
"items": {
"type": "integer"
}
},
"args": {
"required": false,
"description": "A list of arguments to filter by."
}
}
},
{
"methods": [
"POST"
],
"args": {
"mode": {
"required": false,
"default": "create",
"enum": [
"create",
"extend"
],
"description": "The mode for creating the Pod.",
"type": "string"
},
"name": {
"required": false,
"description": "The name of the Pod.",
"type": "string"
},
"label": {
"required": false,
"description": "The singular label of the Pod.",
"type": "string"
},
"type": {
"required": true,
"enum": [
"post_type",
"taxonomy",
"user",
"media",
"comment",
"settings",
"pod",
"table"
],
"description": "The type of the Pod.",
"type": "string"
},
"storage": {
"required": false,
"default": "meta",
"enum": [
"meta",
"table",
"none"
],
"description": "The storage used for the Pod.",
"type": "string"
},
"label_plural": {
"required": false,
"description": "The plural label of the Pod.",
"type": "string"
},
"label_title": {
"required": false,
"description": "The title label of the Pod.",
"type": "string"
},
"label_menu": {
"required": false,
"description": "The menu label of the Pod.",
"type": "string"
},
"menu_location": {
"required": false,
"description": "The menu location of the Pod.",
"type": "string"
}
}
}
],
"_links": {
"self": [
{
"href": "https://test.pods.dev/wp-json/pods/v1/pods"
}
]
}
},
"/pods/v1/pods/(?P<id>\\d+)": {
"namespace": "pods/v1",
"methods": [
"GET",
"POST",
"PUT",
"PATCH",
"DELETE"
],
"endpoints": [
{
"methods": [
"GET"
],
"args": {
"id": {
"required": true,
"description": "The Pod ID.",
"type": "integer"
},
"include_fields": {
"required": false,
"default": 0,
"description": "Whether to include fields (default: off).",
"type": "integer"
},
"include_groups": {
"required": false,
"default": 0,
"description": "Whether to include groups (default: off).",
"type": "integer"
}
}
},
{
"methods": [
"POST",
"PUT",
"PATCH"
],
"args": {
"id": {
"required": true,
"description": "The Pod ID.",
"type": "integer"
},
"name": {
"required": false,
"description": "The new name of the Pod.",
"type": "string"
},
"label": {
"required": false,
"description": "The singular label of the Pod.",
"type": "string"
},
"args": {
"required": false,
"description": "A list of additional options to save to the Pod."
}
}
},
{
"methods": [
"DELETE"
],
"args": {
"id": {
"required": true,
"description": "The Pod ID.",
"type": "integer"
},
"delete_all": {
"required": false,
"default": 0,
"enum": [
0,
1
],
"description": "Whether to delete all content for Pod.",
"type": "integer"
}
}
}
]
},
"/pods/v1/pods/(?P<slug>[\\w\\_\\-]+)": {
"namespace": "pods/v1",
"methods": [
"GET",
"POST",
"PUT",
"PATCH",
"DELETE"
],
"endpoints": [
{
"methods": [
"GET"
],
"args": {
"slug": {
"required": true,
"description": "The Pod slug.",
"type": "string"
},
"include_fields": {
"required": false,
"default": 0,
"description": "Whether to include fields (default: off).",
"type": "integer"
},
"include_groups": {
"required": false,
"default": 0,
"description": "Whether to include groups (default: off).",
"type": "integer"
}
}
},
{
"methods": [
"POST",
"PUT",
"PATCH"
],
"args": {
"slug": {
"required": true,
"description": "The Pod slug.",
"type": "string"
},
"new_name": {
"required": false,
"description": "The new name of the Pod.",
"type": "string"
},
"label": {
"required": false,
"description": "The singular label of the Pod.",
"type": "string"
},
"args": {
"required": false,
"description": "A list of additional options to save to the Pod."
}
}
},
{
"methods": [
"DELETE"
],
"args": {
"slug": {
"required": true,
"description": "The Pod slug.",
"type": "string"
},
"delete_all": {
"required": false,
"default": 0,
"enum": [
0,
1
],
"description": "Whether to delete all content for Pod.",
"type": "integer"
}
}
}
]
},
"/pods/v1/fields": {
"namespace": "pods/v1",
"methods": [
"GET",
"POST"
],
"endpoints": [
{
"methods": [
"GET"
],
"args": {
"return_type": {
"required": false,
"default": "full",
"enum": [
"full",
"names",
"names_ids",
"ids",
"key_names",
"count"
],
"description": "The type of data to return.",
"type": "string"
},
"types": {
"required": false,
"description": "A list of types to filter by.",
"items": {
"type": "string"
}
},
"ids": {
"required": false,
"description": "A list of IDs to filter by.",
"items": {
"type": "integer"
}
},
"args": {
"required": false,
"description": "A list of arguments to filter by."
}
}
},
{
"methods": [
"POST"
],
"args": {
"pod_id": {
"required": false,
"description": "The Pod ID.",
"type": "string"
},
"pod": {
"required": false,
"description": "The Pod name.",
"type": "string"
},
"name": {
"required": false,
"description": "The name of the Field.",
"type": "string"
},
"label": {
"required": true,
"description": "The singular label of the Field.",
"type": "string"
},
"type": {
"required": true,
"enum": [
"text",
"website",
"phone",
"email",
"password",
"paragraph",
"wysiwyg",
"code",
"datetime",
"date",
"time",
"number",
"currency",
"file",
"avatar",
"oembed",
"pick",
"boolean",
"color",
"slug"
],
"description": "The type of the Field.",
"type": "string"
},
"args": {
"required": false,
"description": "A list of additional options to save to the Field."
}
}
}
],
"_links": {
"self": [
{
"href": "https://test.pods.dev/wp-json/pods/v1/fields"
}
]
}
},
"/pods/v1/fields/(?P<id>\\d+)": {
"namespace": "pods/v1",
"methods": [
"GET",
"POST",
"PUT",
"PATCH",
"DELETE"
],
"endpoints": [
{
"methods": [
"GET"
],
"args": {
"id": {
"required": true,
"description": "The Field ID.",
"type": "integer"
}
}
},
{
"methods": [
"POST",
"PUT",
"PATCH"
],
"args": {
"id": {
"required": true,
"description": "The Field ID.",
"type": "integer"
},
"name": {
"required": false,
"description": "The new name of the Field.",
"type": "string"
},
"label": {
"required": false,
"description": "The singular label of the Field.",
"type": "string"
},
"type": {
"required": false,
"description": "The type of the Field.",
"type": "string"
},
"args": {
"required": false,
"description": "A list of additional options to save to the Field."
}
}
},
{
"methods": [
"DELETE"
],
"args": {
"id": {
"required": true,
"description": "The Field ID.",
"type": "integer"
}
}
}
]
},
"/pods/v1/fields/(?P<slug>[\\w\\_\\-]+)": {
"namespace": "pods/v1",
"methods": [
"GET",
"POST",
"PUT",
"PATCH",
"DELETE"
],
"endpoints": [
{
"methods": [
"GET"
],
"args": {
"slug": {
"required": true,
"description": "The Field slug.",
"type": "string"
},
"pod": {
"required": true,
"description": "The Pod slug.",
"type": "string"
}
}
},
{
"methods": [
"POST",
"PUT",
"PATCH"
],
"args": {
"slug": {
"required": true,
"description": "The slug.",
"type": "string"
},
"pod": {
"required": true,
"description": "The Pod slug.",
"type": "string"
},
"new_name": {
"required": false,
"description": "The new name of the Field.",
"type": "string"
},
"label": {
"required": false,
"description": "The singular label of the Field.",
"type": "string"
},
"type": {
"required": false,
"description": "The type of the Field.",
"type": "string"
},
"args": {
"required": false,
"description": "A list of additional options to save to the Field."
}
}
},
{
"methods": [
"DELETE"
],
"args": {
"slug": {
"required": true,
"description": "The slug.",
"type": "string"
},
"pod": {
"required": true,
"description": "The Pod slug.",
"type": "string"
}
}
}
]
},
"/pods/v1/groups": {
"namespace": "pods/v1",
"methods": [
"GET",
"POST"
],
"endpoints": [
{
"methods": [
"GET"
],
"args": {
"return_type": {
"required": false,
"default": "full",
"enum": [
"full",
"names",
"names_ids",
"ids",
"key_names",
"count"
],
"description": "The type of data to return.",
"type": "string"
},
"types": {
"required": false,
"description": "A list of types to filter by.",
"items": {
"type": "string"
}
},
"ids": {
"required": false,
"description": "A list of IDs to filter by.",
"items": {
"type": "integer"
}
},
"args": {
"required": false,
"description": "A list of arguments to filter by."
}
}
},
{
"methods": [
"POST"
],
"args": {
"pod_id": {
"required": false,
"description": "The Pod ID.",
"type": "string"
},
"pod": {
"required": false,
"description": "The Pod name.",
"type": "string"
},
"name": {
"required": false,
"description": "The name of the Group.",
"type": "string"
},
"label": {
"required": true,
"description": "The singular label of the Group.",
"type": "string"
},
"args": {
"required": false,
"description": "A list of additional options to save to the Group."
}
}
}
],
"_links": {
"self": [
{
"href": "https://test.pods.dev/wp-json/pods/v1/groups"
}
]
}
},
"/pods/v1/groups/(?P<id>\\d+)": {
"namespace": "pods/v1",
"methods": [
"GET",
"POST",
"PUT",
"PATCH",
"DELETE"
],
"endpoints": [
{
"methods": [
"GET"
],
"args": {
"id": {
"required": true,
"description": "The Group ID.",
"type": "integer"
},
"include_fields": {
"required": false,
"default": 0,
"description": "Whether to include fields (default: off).",
"type": "integer"
}
}
},
{
"methods": [
"POST",
"PUT",
"PATCH"
],
"args": {
"id": {
"required": true,
"description": "The Group ID.",
"type": "integer"
},
"name": {
"required": false,
"description": "The new name of the Group.",
"type": "string"
},
"label": {
"required": false,
"description": "The singular label of the Group.",
"type": "string"
},
"type": {
"required": false,
"description": "The type of the Group.",
"type": "string"
},
"args": {
"required": false,
"description": "A list of additional options to save to the Group."
}
}
},
{
"methods": [
"DELETE"
],
"args": {
"id": {
"required": true,
"description": "The Group ID.",
"type": "integer"
}
}
}
]
},
"/pods/v1/groups/(?P<slug>[\\w\\_\\-]+)": {
"namespace": "pods/v1",
"methods": [
"GET",
"POST",
"PUT",
"PATCH",
"DELETE"
],
"endpoints": [
{
"methods": [
"GET"
],
"args": {
"slug": {
"required": true,
"description": "The Group slug.",
"type": "string"
},
"pod": {
"required": true,
"description": "The Pod slug.",
"type": "string"
},
"include_fields": {
"required": false,
"default": 0,
"description": "Whether to include fields (default: off).",
"type": "integer"
}
}
},
{
"methods": [
"POST",
"PUT",
"PATCH"
],
"args": {
"slug": {
"required": true,
"description": "The Field slug.",
"type": "string"
},
"pod": {
"required": true,
"description": "The Pod slug.",
"type": "string"
},
"new_name": {
"required": false,
"description": "The new name of the Group.",
"type": "string"
},
"label": {
"required": false,
"description": "The singular label of the Group.",
"type": "string"
},
"type": {
"required": false,
"description": "The type of the Group.",
"type": "string"
},
"args": {
"required": false,
"description": "A list of additional options to save to the Group."
}
}
},
{
"methods": [
"DELETE"
],
"args": {
"slug": {
"required": true,
"description": "The slug.",
"type": "string"
},
"pod": {
"required": true,
"description": "The Pod slug.",
"type": "string"
}
}
}
]
}
},
"_links": {
"up": [
{
"href": "https://test.pods.dev/wp-json/"
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment