Equipment
POST <qbench-url>/qbench/api/v1/equipment/<int:equipment_id>/test/<int:test_id>
Create a single equipment usage on a test.
Example Request
POST /qbench/api/v1/equipment/<int:equipment_id>/test/<int:test_id> HTTP/1.1
Authorization: Bearer 63ff42c5-49e6-42e2-bc3f-04fbfc22bbcb
Host: <qbench-url>
Content-Type: application/json
{
"equipment_id": 123,
"test_id": 321,
"notes": "Equipment Usage Notes",
"date_used":"09/15/2021"
}
Example Response:
{
"id": 1,
"equipment_id": 123,
"test_id": 321,
"date_used": "09/15/2021",
"notes": "Equipment Usage Notes",
"created_by_user": {"id": 10, "first_name": "User First Name", "last_name": "User Last Name"},
"created_by_api_client": {"id": 14, "name": "API Client"}
}
Note: `create_by_user` and `created_by_api_client` will be populated based on how the Equipment Usage was created.
POST <qbench-url>/qbench/api/v1/equipment/<int:equipment_id>/test
Create multiple equipment usages on tests.
Example Request
POST /qbench/api/v1/equipment/<int:equipment_id>/test HTTP/1.1
Authorization: Bearer 63ff42c5-49e6-42e2-bc3f-04fbfc22bbcb
Host: <qbench-url>
Content-Type: application/json
[
{
"equipment_id": 123,
"test_id": 10,
"notes": "Equipment Usage Notes",
"date_used":"09/15/2021"
},
{
"equipment_id": 123,
"test_id": 11,
"notes": "Equipment Usage Notes",
"date_used":"09/15/2021"
}
]
Example Response:
[
{
"id": 1,
"equipment_id": 123,
"test_id": 10,
"date_used": "09/15/2021",
"notes": "Equipment Usage Notes",
"created_by_user": {"id": 10, "first_name": "User First Name", "last_name": "User Last Name"},
"created_by_api_client": {"id": 14, "name": "API Client"}
},
{
"id": 2,
"test_id": 11,
"equipment_id": 123,
"date_used": "09/15/2021",
"notes": "Equipment Usage Notes",
"created_by_user": {"id": 10, "first_name": "User First Name", "last_name": "User Last Name"},
"created_by_api_client": {"id": 14, "name": "API Client"}
},
]
Note: `create_by_user` and `created_by_api_client` will be populated based on how the Equipment Usage was created.
POST <qbench-url>/qbench/api/v1/equipment/<int:equipment_id>/batch/<int:batch_id>
Create a single equipment usage on a batch.
Example Request
POST /qbench/api/v1/equipment/<int:equipment_id>/batch/<int:batch_id> HTTP/1.1
Authorization: Bearer 63ff42c5-49e6-42e2-bc3f-04fbfc22bbcb
Host: <qbench-url>
Content-Type: application/json
{
"equipment_id": 123,
"batch_id": 321,
"notes": "Equipment Usage Notes",
"date_used":"09/15/2021"
}
Example Response:
{
"id": 1,
"equipment_id": 123,
"batch_id": 321,
"date_used": "09/15/2021",
"notes": "Equipment Usage Notes",
"created_by_user": {"id": 10, "first_name": "User First Name", "last_name": "User Last Name"},
"created_by_api_client": {"id": 14, "name": "API Client"}
}
Note: `create_by_user` and `created_by_api_client` will be populated based on how the Equipment Usage was created.
POST <qbench-url>/qbench/api/v1/equipment/<int:equipment_id>/batch
Create equipment usages on a batches.
Example Request
POST /qbench/api/v1/equipment/<int:equipment_id>/batch HTTP/1.1
Authorization: Bearer 63ff42c5-49e6-42e2-bc3f-04fbfc22bbcb
Host: <qbench-url>
Content-Type: application/json
[
{
"equipment_id": 123,
"batch_id": 10,
"notes": "Equipment Usage Notes",
"date_used":"09/15/2021"
},
{
"equipment_id": 123,
"batch_id": 11,
"notes": "Equipment Usage Notes",
"date_used":"09/15/2021"
}
]
Example Response:
[
{
"id": 1,
"equipment_id": 123,
"batch_id": 10,
"date_used": "09/15/2021",
"notes": "Equipment Usage Notes",
"created_by_user": {"id": 10, "first_name": "User First Name", "last_name": "User Last Name"},
"created_by_api_client": {"id": 14, "name": "API Client"}
},
{
"id": 2,
"batch_id": 11,
"equipment_id": 123,
"date_used": "09/15/2021",
"notes": "Equipment Usage Notes",
"created_by_user": {"id": 10, "first_name": "User First Name", "last_name": "User Last Name"},
"created_by_api_client": {"id": 14, "name": "API Client"}
},
]
Note: `create_by_user` and `created_by_api_client` will be populated based on how the Equipment Usage was created.
Comments
0 comments
Please sign in to leave a comment.