Endpoint Specifications

These specifications document the available Supply Chain REST API endpoints. They are generated from the official OpenAPI formatted YAML specification, which can be found on the Sawtooth Github.

GET /agents

Fetches the data for the current set of Agents

Fetches a paginated list of all Agents. Using the name filter parameter narrows the list to any Agents who have a name which contains a specified case-insensitive string.

Query Parameters:
 
  • name (string) – A partial name to filter Agents by
  • count (integer) – Number of items to return
  • min (string) – Id or index to start paging (inclusive)
  • max (string) – Id or index to end paging (inclusive)
Status Codes:
GET /agents/{agent_id}

Fetches a particular Agent.

Parameters:
  • agent_id (string) – Agent identifier, the public key the agent uses.
Status Codes:
GET /applications

Fetches the data for the current set of Applications

Fetches a paginated list of all Applications. Using the applicant parameter will narrow the list to any Applications that have a matching value in their applicant field. Using the identifier filter parameter will narrow the list to any Applications that have an identifier containing the specified string. Using the status parameter will narrow the list to any Applications that have a matching value in their status field.

Query Parameters:
 
  • applicant (string) – The public key of the applicant Agent to filter by
  • status (string) – An application status to filter by
  • count (integer) – Number of items to return
  • min (string) – Id or index to start paging (inclusive)
  • max (string) – Id or index to end paging (inclusive)
Status Codes:
GET /records

Fetches the data for the current set of Records

Fetches a paginated list of all Records. Using the identifier filter parameter will narrow the list to any Records that have an identifier containing the specified string. Records are identified by their serial number or other marking on the physical asset.

Query Parameters:
 
  • identifier (string) – A partial identifier to filter Records by
  • count (integer) – Number of items to return
  • min (string) – Id or index to start paging (inclusive)
  • max (string) – Id or index to end paging (inclusive)
Status Codes:
GET /records/{record_id}

Fetches a particular Record.

Parameters:
  • record_id (string) – Record identifier, the serial number or natural identifier of the item (material) being tracked.
Status Codes:
GET /records/{record_id}/applications

Fetches Applications for a particular Record.

Fetches a paginated list of Applications for a record. Applications are identified by the identifier of the Record they are associated with. Using the applicant parameter will narrow the list to any Applications that have a matching value in their applicant field. Using the status parameter will narrow the list to any Applications that have a matching value in their status field.

Parameters:
  • record_id (string) – Record identifier, the serial number or natural identifier of the item (material) being tracked.
Query Parameters:
 
  • applicant (string) – The public key of the applicant Agent to filter by
  • status (string) – An application status to filter by
  • count (integer) – Number of items to return
  • min (string) – Id or index to start paging (inclusive)
  • max (string) – Id or index to end paging (inclusive)
Status Codes: