Create a shift-handoff draft
curl --request POST \
--url https://api.example.com/v1/handoffs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"evidence": [
{
"label": "STR operation abc",
"path": "/str/operations/abc"
}
],
"note": "<string>"
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/handoffs"
payload := strings.NewReader("{\n \"evidence\": [\n {\n \"label\": \"STR operation abc\",\n \"path\": \"/str/operations/abc\"\n }\n ],\n \"note\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
evidence: [{label: 'STR operation abc', path: '/str/operations/abc'}],
note: '<string>'
})
};
fetch('https://api.example.com/v1/handoffs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.example.com/v1/handoffs"
payload = {
"evidence": [
{
"label": "STR operation abc",
"path": "/str/operations/abc"
}
],
"note": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"createdAt": "2023-11-07T05:31:56Z",
"evidence": [
{
"label": "STR operation abc",
"path": "/str/operations/abc"
}
],
"id": "<string>",
"note": "<string>",
"owner": {
"sub": "<string>",
"owner": "<string>"
},
"status": "draft",
"updatedAt": "2023-11-07T05:31:56Z",
"approvedBy": {
"sub": "<string>",
"owner": "<string>"
},
"receiptId": "<string>",
"submittedBy": {
"sub": "<string>",
"owner": "<string>"
}
}{
"correlationId": "req-7a3f9c2e",
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"correlationId": "req-7a3f9c2e",
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"correlationId": "req-7a3f9c2e",
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}Create a shift-handoff draft
POST
/
v1
/
handoffs
Create a shift-handoff draft
curl --request POST \
--url https://api.example.com/v1/handoffs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"evidence": [
{
"label": "STR operation abc",
"path": "/str/operations/abc"
}
],
"note": "<string>"
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/handoffs"
payload := strings.NewReader("{\n \"evidence\": [\n {\n \"label\": \"STR operation abc\",\n \"path\": \"/str/operations/abc\"\n }\n ],\n \"note\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
evidence: [{label: 'STR operation abc', path: '/str/operations/abc'}],
note: '<string>'
})
};
fetch('https://api.example.com/v1/handoffs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.example.com/v1/handoffs"
payload = {
"evidence": [
{
"label": "STR operation abc",
"path": "/str/operations/abc"
}
],
"note": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"createdAt": "2023-11-07T05:31:56Z",
"evidence": [
{
"label": "STR operation abc",
"path": "/str/operations/abc"
}
],
"id": "<string>",
"note": "<string>",
"owner": {
"sub": "<string>",
"owner": "<string>"
},
"status": "draft",
"updatedAt": "2023-11-07T05:31:56Z",
"approvedBy": {
"sub": "<string>",
"owner": "<string>"
},
"receiptId": "<string>",
"submittedBy": {
"sub": "<string>",
"owner": "<string>"
}
}{
"correlationId": "req-7a3f9c2e",
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"correlationId": "req-7a3f9c2e",
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"correlationId": "req-7a3f9c2e",
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}Autorizaciones
JWT bearer token issued by the identity provider.
Encabezados
Cuerpo
application/json
Respuesta
Created
Show child attributes
Show child attributes
Stable handoff identifier.
Show child attributes
Show child attributes
Opciones disponibles:
draft, submitted, approved Show child attributes
Show child attributes
Show child attributes
Show child attributes
¿Esta página le ayudó?

