Skip to content

Study Descriptions

Reference for the study_descriptions endpoints of the Surfmeter API.

Surfmeter API – Study Descriptions v1

The Surfmeter API lets you manage clients, users, capabilities, measurements, and organization-wide settings programmatically.


Servers

Description URL
https://surfmeter-server.{host}/client_admin_api/v1 https://surfmeter-server.{host}/client_admin_api/v1

Study Descriptions


GET /study_descriptions

Input parameters

Parameter In Type Default Nullable Description
ApiKeyAuth header string N/A No API key used on every request. Create keys in the Surfmeter Dashboard under Keys → Surfmeter API Keys.

Response 200 OK

{
    "study_descriptions": [
        {
            "id": 0,
            "name": "string",
            "import_source": "string",
            "created_at": "string",
            "updated_at": "string",
            "study_id": "string",
            "study_type": "string",
            "subject": "string",
            "revision": 0,
            "data": {},
            "uses_credentials": true,
            "credential": {
                "username": "string",
                "password_set": true
            }
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "study_descriptions": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "name": {
                        "type": "string"
                    },
                    "import_source": {
                        "type": "string",
                        "nullable": true
                    },
                    "created_at": {
                        "type": "string"
                    },
                    "updated_at": {
                        "type": "string"
                    },
                    "study_id": {
                        "type": "string",
                        "nullable": true
                    },
                    "study_type": {
                        "type": "string",
                        "nullable": true
                    },
                    "subject": {
                        "type": "string",
                        "nullable": true
                    },
                    "revision": {
                        "type": "integer",
                        "nullable": true
                    },
                    "data": {
                        "type": "object",
                        "nullable": true
                    },
                    "uses_credentials": {
                        "type": "boolean"
                    },
                    "credential": {
                        "type": "object",
                        "properties": {
                            "username": {
                                "type": "string",
                                "nullable": true
                            },
                            "password_set": {
                                "type": "boolean"
                            }
                        },
                        "required": [
                            "username",
                            "password_set"
                        ],
                        "nullable": true
                    }
                },
                "required": [
                    "id",
                    "name",
                    "created_at",
                    "updated_at",
                    "uses_credentials",
                    "credential"
                ]
            }
        }
    },
    "required": [
        "study_descriptions"
    ]
}

POST /study_descriptions

Input parameters

Parameter In Type Default Nullable Description
ApiKeyAuth header string N/A No API key used on every request. Create keys in the Surfmeter Dashboard under Keys → Surfmeter API Keys.

Request body

{
    "name": "string",
    "data": {},
    "uses_credentials": true,
    "credential": {
        "username": "string",
        "password": "string"
    }
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Data for study description create action",
    "type": "object",
    "required": [
        "name",
        "data"
    ],
    "properties": {
        "name": {
            "type": "string"
        },
        "data": {
            "type": "object"
        },
        "uses_credentials": {
            "type": "boolean"
        },
        "credential": {
            "type": "object",
            "properties": {
                "username": {
                    "type": "string"
                },
                "password": {
                    "type": "string"
                }
            }
        }
    }
}

Response 201 Created

{
    "study_description": {
        "id": 0,
        "name": "string",
        "import_source": "string",
        "created_at": "string",
        "updated_at": "string",
        "study_id": "string",
        "study_type": "string",
        "subject": "string",
        "revision": 0,
        "data": {},
        "uses_credentials": true,
        "credential": {
            "username": "string",
            "password_set": true
        },
        "versions": [
            {
                "id": 0,
                "revision": 0,
                "data": {},
                "uses_credentials": true,
                "data_hash": "string",
                "created_by_id": 0,
                "created_by_name": "string",
                "created_at": "string"
            }
        ],
        "references": [
            {
                "public_config_id": 0,
                "public_config_name": "string",
                "public_config_version_id": 0,
                "public_config_revision": 0,
                "public_config_published": true,
                "study_description_version_id": 0,
                "study_description_revision": 0
            }
        ]
    }
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "study_description": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                },
                "import_source": {
                    "type": "string",
                    "nullable": true
                },
                "created_at": {
                    "type": "string"
                },
                "updated_at": {
                    "type": "string"
                },
                "study_id": {
                    "type": "string",
                    "nullable": true
                },
                "study_type": {
                    "type": "string",
                    "nullable": true
                },
                "subject": {
                    "type": "string",
                    "nullable": true
                },
                "revision": {
                    "type": "integer",
                    "nullable": true
                },
                "data": {
                    "type": "object",
                    "nullable": true
                },
                "uses_credentials": {
                    "type": "boolean"
                },
                "credential": {
                    "type": "object",
                    "properties": {
                        "username": {
                            "type": "string",
                            "nullable": true
                        },
                        "password_set": {
                            "type": "boolean"
                        }
                    },
                    "required": [
                        "username",
                        "password_set"
                    ],
                    "nullable": true
                },
                "versions": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "integer"
                            },
                            "revision": {
                                "type": "integer"
                            },
                            "data": {
                                "type": "object"
                            },
                            "uses_credentials": {
                                "type": "boolean"
                            },
                            "data_hash": {
                                "type": "string"
                            },
                            "created_by_id": {
                                "type": "integer",
                                "nullable": true
                            },
                            "created_by_name": {
                                "type": "string",
                                "nullable": true
                            },
                            "created_at": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "id",
                            "revision",
                            "data",
                            "uses_credentials",
                            "data_hash",
                            "created_at"
                        ]
                    }
                },
                "references": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "properties": {
                            "public_config_id": {
                                "type": "integer"
                            },
                            "public_config_name": {
                                "type": "string"
                            },
                            "public_config_version_id": {
                                "type": "integer"
                            },
                            "public_config_revision": {
                                "type": "integer"
                            },
                            "public_config_published": {
                                "type": "boolean"
                            },
                            "study_description_version_id": {
                                "type": "integer"
                            },
                            "study_description_revision": {
                                "type": "integer"
                            }
                        },
                        "required": [
                            "public_config_id",
                            "public_config_name",
                            "public_config_version_id",
                            "public_config_revision",
                            "public_config_published",
                            "study_description_version_id",
                            "study_description_revision"
                        ]
                    }
                }
            },
            "required": [
                "id",
                "name",
                "created_at",
                "updated_at",
                "uses_credentials",
                "credential",
                "versions",
                "references"
            ]
        }
    },
    "required": [
        "study_description"
    ]
}

GET /study_descriptions/{id}

Input parameters

Parameter In Type Default Nullable Description
ApiKeyAuth header string N/A No API key used on every request. Create keys in the Surfmeter Dashboard under Keys → Surfmeter API Keys.
id path string No

Response 200 OK

{
    "study_description": {
        "id": 0,
        "name": "string",
        "import_source": "string",
        "created_at": "string",
        "updated_at": "string",
        "study_id": "string",
        "study_type": "string",
        "subject": "string",
        "revision": 0,
        "data": {},
        "uses_credentials": true,
        "credential": {
            "username": "string",
            "password_set": true
        },
        "versions": [
            {
                "id": 0,
                "revision": 0,
                "data": {},
                "uses_credentials": true,
                "data_hash": "string",
                "created_by_id": 0,
                "created_by_name": "string",
                "created_at": "string"
            }
        ],
        "references": [
            {
                "public_config_id": 0,
                "public_config_name": "string",
                "public_config_version_id": 0,
                "public_config_revision": 0,
                "public_config_published": true,
                "study_description_version_id": 0,
                "study_description_revision": 0
            }
        ]
    }
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "study_description": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                },
                "import_source": {
                    "type": "string",
                    "nullable": true
                },
                "created_at": {
                    "type": "string"
                },
                "updated_at": {
                    "type": "string"
                },
                "study_id": {
                    "type": "string",
                    "nullable": true
                },
                "study_type": {
                    "type": "string",
                    "nullable": true
                },
                "subject": {
                    "type": "string",
                    "nullable": true
                },
                "revision": {
                    "type": "integer",
                    "nullable": true
                },
                "data": {
                    "type": "object",
                    "nullable": true
                },
                "uses_credentials": {
                    "type": "boolean"
                },
                "credential": {
                    "type": "object",
                    "properties": {
                        "username": {
                            "type": "string",
                            "nullable": true
                        },
                        "password_set": {
                            "type": "boolean"
                        }
                    },
                    "required": [
                        "username",
                        "password_set"
                    ],
                    "nullable": true
                },
                "versions": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "integer"
                            },
                            "revision": {
                                "type": "integer"
                            },
                            "data": {
                                "type": "object"
                            },
                            "uses_credentials": {
                                "type": "boolean"
                            },
                            "data_hash": {
                                "type": "string"
                            },
                            "created_by_id": {
                                "type": "integer",
                                "nullable": true
                            },
                            "created_by_name": {
                                "type": "string",
                                "nullable": true
                            },
                            "created_at": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "id",
                            "revision",
                            "data",
                            "uses_credentials",
                            "data_hash",
                            "created_at"
                        ]
                    }
                },
                "references": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "properties": {
                            "public_config_id": {
                                "type": "integer"
                            },
                            "public_config_name": {
                                "type": "string"
                            },
                            "public_config_version_id": {
                                "type": "integer"
                            },
                            "public_config_revision": {
                                "type": "integer"
                            },
                            "public_config_published": {
                                "type": "boolean"
                            },
                            "study_description_version_id": {
                                "type": "integer"
                            },
                            "study_description_revision": {
                                "type": "integer"
                            }
                        },
                        "required": [
                            "public_config_id",
                            "public_config_name",
                            "public_config_version_id",
                            "public_config_revision",
                            "public_config_published",
                            "study_description_version_id",
                            "study_description_revision"
                        ]
                    }
                }
            },
            "required": [
                "id",
                "name",
                "created_at",
                "updated_at",
                "uses_credentials",
                "credential",
                "versions",
                "references"
            ]
        }
    },
    "required": [
        "study_description"
    ]
}

PUT /study_descriptions/{id}

Input parameters

Parameter In Type Default Nullable Description
ApiKeyAuth header string N/A No API key used on every request. Create keys in the Surfmeter Dashboard under Keys → Surfmeter API Keys.
id path string No

Request body

{
    "name": "string",
    "data": {},
    "uses_credentials": true,
    "credential": {
        "username": "string",
        "password": "string"
    }
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Data for study description update action. `name` renames the logical record; `data`, if present, creates the next immutable revision. Either or both may be given.",
    "type": "object",
    "properties": {
        "name": {
            "type": "string"
        },
        "data": {
            "type": "object"
        },
        "uses_credentials": {
            "type": "boolean"
        },
        "credential": {
            "type": "object",
            "properties": {
                "username": {
                    "type": "string"
                },
                "password": {
                    "type": "string"
                }
            }
        }
    }
}

Response 200 OK

{
    "study_description": {
        "id": 0,
        "name": "string",
        "import_source": "string",
        "created_at": "string",
        "updated_at": "string",
        "study_id": "string",
        "study_type": "string",
        "subject": "string",
        "revision": 0,
        "data": {},
        "uses_credentials": true,
        "credential": {
            "username": "string",
            "password_set": true
        },
        "versions": [
            {
                "id": 0,
                "revision": 0,
                "data": {},
                "uses_credentials": true,
                "data_hash": "string",
                "created_by_id": 0,
                "created_by_name": "string",
                "created_at": "string"
            }
        ],
        "references": [
            {
                "public_config_id": 0,
                "public_config_name": "string",
                "public_config_version_id": 0,
                "public_config_revision": 0,
                "public_config_published": true,
                "study_description_version_id": 0,
                "study_description_revision": 0
            }
        ]
    }
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "study_description": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                },
                "import_source": {
                    "type": "string",
                    "nullable": true
                },
                "created_at": {
                    "type": "string"
                },
                "updated_at": {
                    "type": "string"
                },
                "study_id": {
                    "type": "string",
                    "nullable": true
                },
                "study_type": {
                    "type": "string",
                    "nullable": true
                },
                "subject": {
                    "type": "string",
                    "nullable": true
                },
                "revision": {
                    "type": "integer",
                    "nullable": true
                },
                "data": {
                    "type": "object",
                    "nullable": true
                },
                "uses_credentials": {
                    "type": "boolean"
                },
                "credential": {
                    "type": "object",
                    "properties": {
                        "username": {
                            "type": "string",
                            "nullable": true
                        },
                        "password_set": {
                            "type": "boolean"
                        }
                    },
                    "required": [
                        "username",
                        "password_set"
                    ],
                    "nullable": true
                },
                "versions": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "integer"
                            },
                            "revision": {
                                "type": "integer"
                            },
                            "data": {
                                "type": "object"
                            },
                            "uses_credentials": {
                                "type": "boolean"
                            },
                            "data_hash": {
                                "type": "string"
                            },
                            "created_by_id": {
                                "type": "integer",
                                "nullable": true
                            },
                            "created_by_name": {
                                "type": "string",
                                "nullable": true
                            },
                            "created_at": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "id",
                            "revision",
                            "data",
                            "uses_credentials",
                            "data_hash",
                            "created_at"
                        ]
                    }
                },
                "references": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "properties": {
                            "public_config_id": {
                                "type": "integer"
                            },
                            "public_config_name": {
                                "type": "string"
                            },
                            "public_config_version_id": {
                                "type": "integer"
                            },
                            "public_config_revision": {
                                "type": "integer"
                            },
                            "public_config_published": {
                                "type": "boolean"
                            },
                            "study_description_version_id": {
                                "type": "integer"
                            },
                            "study_description_revision": {
                                "type": "integer"
                            }
                        },
                        "required": [
                            "public_config_id",
                            "public_config_name",
                            "public_config_version_id",
                            "public_config_revision",
                            "public_config_published",
                            "study_description_version_id",
                            "study_description_revision"
                        ]
                    }
                }
            },
            "required": [
                "id",
                "name",
                "created_at",
                "updated_at",
                "uses_credentials",
                "credential",
                "versions",
                "references"
            ]
        }
    },
    "required": [
        "study_description"
    ]
}

DELETE /study_descriptions/{id}

Input parameters

Parameter In Type Default Nullable Description
ApiKeyAuth header string N/A No API key used on every request. Create keys in the Surfmeter Dashboard under Keys → Surfmeter API Keys.
id path string No

Response 200 OK

Schema of the response body
{
    "type": "object",
    "properties": {},
    "required": []
}

Schemas

StudyDescriptionCreateData

Name Type
credential Properties: username, password
data
name string
uses_credentials boolean

StudyDescriptionCreateResponse

Name Type
study_description Properties: id, name, import_source, created_at, updated_at, study_id, study_type, subject, revision, data, uses_credentials, credential, versions, references

StudyDescriptionDestroyResponse

StudyDescriptionIndexResponse

Name Type
study_descriptions Array<Properties: id, name, import_source, created_at, updated_at, study_id, study_type, subject, revision, data, uses_credentials, credential>

StudyDescriptionShowResponse

Name Type
study_description Properties: id, name, import_source, created_at, updated_at, study_id, study_type, subject, revision, data, uses_credentials, credential, versions, references

StudyDescriptionUpdateData

Name Type
credential Properties: username, password
data
name string
uses_credentials boolean

StudyDescriptionUpdateResponse

Name Type
study_description Properties: id, name, import_source, created_at, updated_at, study_id, study_type, subject, revision, data, uses_credentials, credential, versions, references

Security schemes

Name Type Scheme Description
ApiKeyAuth apiKey API key used on every request. Create keys in the Surfmeter Dashboard under Keys → Surfmeter API Keys.