/p requests
  • 22 Feb 2023
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

/p requests

  • Dark
    Light
  • PDF

Article summary

As described above, the /p API method requests metadata about protocols and protocol headers for enabling their configuration and invocation.

Request

The JSON payload requires a "request_type". Request types include:
get_tags
get_subjects - DEPRECATED
get_protocols
get_protocol
get_protocols_for_tags
get_protocols_for_category
get_protocols_for_subject - DEPRECATED

Example requests

{
  "request": "get_protocols"
}
{
  "request": "get_protocol",
  "name": "summary"
}

Response

The response to the /p request will return different information depending on the“request” attribute used. All the requests that start with "get_protocol" will return results as shown in the example below. “get_tags” and "get_subjects" will return simple arrays of strings listing tags or subjects (DEPRECATED).

Example /p response for get_protocol (summary)

(truncated to one protocol for brevity)

{
  "name": "summary",
  "title": "Summary",
  "description": "Produce a summary report using the Tag.bio native method.",
  "require_auth": false,
  "asset": {
    "path": "chart-axes-box-plot-hoz-line-mixed.png"
  },
  "category": "Native Apps",
  "tags": [],
  "groups": [],
  "argument_sets": [
    {
      "argument_set_definition": {
        "argument_set_type": "optional",
        "name": "species_and_observation",
        "title": "Species and Observation",
        "description": ""
      },
      "arguments": [
        {
          "argument_definition": {
            "argument_type": "categorical-checkbox-filter",
            "name": "species_and_observation__Species",
            "title": "Species"
          },
          "argument_protocol": {
            "callback_type": "argument",
            "content_type": "application/json",
            "title": "Species",
            "description": "",
            "protocol_instance": {
              "name": "species_and_observation__Species",
              "arguments": {}
            }
          },
          "dependencies": [
            "species_and_observation__Observation"
          ],
          "independence": true
        },
        {
          "argument_definition": {
            "argument_type": "categorical-checkbox-filter",
            "name": "species_and_observation__Observation",
            "title": "Observation"
          },
          "argument_protocol": {
            "callback_type": "argument",
            "content_type": "application/json",
            "title": "Observation",
            "description": "",
            "protocol_instance": {
              "name": "species_and_observation__Observation",
              "arguments": {}
            }
          },
          "dependencies": [
            "species_and_observation__Species"
          ],
          "independence": true
        }
      ]
    },
    {
      "argument_set_definition": {
        "argument_set_type": "minimum-one",
        "name": "sepal_and_petal",
        "title": "Sepal and Petal Variables",
        "description": ""
      },
      "arguments": [
        {
          "argument_definition": {
            "argument_type": "categorical-checkbox-filter",
            "name": "sepal_and_petal__Sepal",
            "title": "Sepal"
          },
          "argument_protocol": {
            "callback_type": "argument",
            "content_type": "application/json",
            "title": "Sepal",
            "description": "",
            "protocol_instance": {
              "name": "sepal_and_petal__Sepal",
              "arguments": {}
            }
          }
        },
        {
          "argument_definition": {
            "argument_type": "categorical-checkbox-filter",
            "name": "sepal_and_petal__Petal",
            "title": "Petal"
          },
          "argument_protocol": {
            "callback_type": "argument",
            "content_type": "application/json",
            "title": "Petal",
            "description": "",
            "protocol_instance": {
              "name": "sepal_and_petal__Petal",
              "arguments": {}
            }
          }
        }
      ]
    }
  ],
  "method": "summary"
}

Was this article helpful?

What's Next