openapi: 3.0.1 info: description: Gain greater visibility by connecting your fleets, equipment, sites, and people. title: Samsara Trailer Assignments API version: '2024-11-18' servers: - url: https://api.samsara.com/ - url: https://api.eu.samsara.com/ security: - AccessTokenHeader: [] tags: - name: Trailer Assignments paths: /v1/fleet/trailers/assignments: get: description: "\n\n\nThis endpoint is still on our legacy API.\n\n\n\nFetch trailer assignment data for all trailers in your organization. \n\n Rate limit: 100 requests/sec (learn more about rate limits here). \n\n **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our API feedback form. If you encountered an issue or noticed inaccuracies in the API documentation, please submit a case to our support team.\n\nTo use this endpoint, select **Read Assignments** under the Assignments category when creating or editing an API token. Learn More." operationId: V1getAllTrailerAssignments parameters: - description: Timestamp in Unix epoch miliseconds representing the start of the period to fetch. Omitting both startMs and endMs only returns current assignments. in: query name: startMs schema: format: int64 type: integer - description: Timestamp in Unix epoch miliseconds representing the end of the period to fetch. Omitting endMs sets endMs as the current time in: query name: endMs schema: format: int64 type: integer - description: Pagination parameter indicating the number of results to return in this request. Used in conjunction with either 'startingAfter' or 'endingBefore'. in: query name: limit schema: format: int64 type: number - description: Pagination parameter indicating the cursor position to continue returning results after. Used in conjunction with the 'limit' parameter. Mutually exclusive with 'endingBefore' parameter. in: query name: startingAfter schema: type: string - description: Pagination parameter indicating the cursor position to return results before. Used in conjunction with the 'limit' parameter. Mutually exclusive with 'startingAfter' parameter. in: query name: endingBefore schema: type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/inline_response_200_7' description: Returns trailer assignment data for all trailers in your organization default: content: application/json: schema: $ref: '#/components/schemas/V1ErrorResponse' description: Unexpected error. summary: List Trailer Assignments for All Trailers tags: - Trailer Assignments components: schemas: V1TrailerAssignmentResponse: properties: driverId: description: The ID of the driver associated with this trailer. example: 2047 format: int64 type: integer endMs: description: The time at which the driver ended the assignment. If the assignment is current, this value will be omitted. example: 1462881998034 format: int64 type: integer startMs: description: The time at which the driver started the assignment example: 1462878398034 format: int64 type: integer type: object V1Pagination: properties: endCursor: description: Cursor identifier representing the last element in the response. This value should be used in conjunction with a subsequent request's 'startingAfter' query parameter. example: MTU5MTEzNjA2OTU0MzQ3 type: string hasNextPage: description: True if there are more pages of results after this response. type: boolean hasPrevPage: description: True if there are more pages of results before this response. type: boolean startCursor: description: Cursor identifier representing the first element in the response. This value should be used in conjunction with a subsequent request's 'ending_before' query parameter. example: MTU5MTEzNjA2OTU0MzQ3 type: string required: - endCursor - hasNextPage - hasPrevPage - startCursor type: object V1TrailerAssignmentsResponse_allOf: properties: trailerAssignments: items: $ref: '#/components/schemas/V1TrailerAssignmentResponse' type: array type: object V1ErrorResponse: description: Error message describing why the request failed. type: string V1TrailerAssignmentsResponse: allOf: - $ref: '#/components/schemas/V1TrailerBase' - $ref: '#/components/schemas/V1TrailerAssignmentsResponse_allOf' V1TrailerBase: properties: id: description: ID of the trailer example: 2041 format: int64 type: integer name: description: Assignment trailer name (given when creating trailer via the trailer portal) example: myTrailer format: string type: string required: - id - name type: object inline_response_200_7: properties: pagination: $ref: '#/components/schemas/V1Pagination' trailers: items: $ref: '#/components/schemas/V1TrailerAssignmentsResponse' type: array type: object securitySchemes: AccessTokenHeader: type: http scheme: bearer x-original-swagger-version: '2.0' x-readme: explorer-enabled: true proxy-enabled: true