Mutation
mutation CreateEndpoint($input: CreateEndpointInput!) {
createEndpoint(input: $input) {
endpoint {
activeContent
apiVersion {
allowedOrigins
applications {
__typename
}
authentication
cardDefinitions {
__typename
}
clusters {
__typename
}
createdAt
}
apiVersionId
cardDefinitions {
edges {
__typename
}
nodes {
__typename
}
pageInfo {
__typename
}
totalCount
}
description
displayName
}
errors {
__typename
... on GraphQlError {
code
details {
__typename
}
message
}
}
}
}Variables
{
"input": {
"contentSelection": {
"filters": [
{
"segmentDefinitionId": "string"
}
],
"id": "string",
"properties": [
{
"id": "string"
}
],
"relations": [
{
"alias": "string",
"cardinality": "PLURAL",
"id": "string",
"target": {}
}
]
},
"destinationId": "id",
"displayName": "string",
"safeName": "string",
"versionId": "id"
}
}Response
{
"data": {
"createEndpoint": {
"endpoint": {
"activeContent": "value",
"apiVersion": {
"allowedOrigins": [
"value"
],
"applications": {
"__typename": "ApplicationsConnection"
},
"authentication": "PROTECTED",
"cardDefinitions": {
"__typename": "CardDefinitionsConnection"
},
"clusters": {
"__typename": "ClustersConnection"
},
"createdAt": "value"
},
"apiVersionId": "id",
"cardDefinitions": {
"edges": [
{
"__typename": "CardDefinitionsEdge"
}
],
"nodes": [
{
"__typename": "CardDefinition"
}
],
"pageInfo": {
"__typename": "PageInfo"
},
"totalCount": 1
},
"description": "string",
"displayName": "string"
},
"errors": [
{
"__typename": "GraphQlError",
"code": "string",
"details": [
{
"__typename": "KeyValuePairOfStringAndString"
}
],
"message": "string"
}
]
}
}
}Mutations
createEndpoint
Adds an endpoint to an API version and returns it. On a PUBLISHED version it also starts publishing the new endpoint; follow ApiVersion.state. Fails with ConflictError when another endpoint of the version has the safeName, the version is publishing or live in a state other than PUBLISHED, or a segment in filters is SCHEDULED or ARCHIVED (queue those with queueSegmentChangesForEndpoint). Fails with ValidationError when safeName is reserved or contentSelection names unknown card properties or relations.
MUTATION
createEndpoint(input: CreateEndpointInput!): CreateEndpointPayload!Arguments
input
required
Returns
endpoint
errors
Mutation
mutation CreateEndpoint($input: CreateEndpointInput!) {
createEndpoint(input: $input) {
endpoint {
activeContent
apiVersion {
allowedOrigins
applications {
__typename
}
authentication
cardDefinitions {
__typename
}
clusters {
__typename
}
createdAt
}
apiVersionId
cardDefinitions {
edges {
__typename
}
nodes {
__typename
}
pageInfo {
__typename
}
totalCount
}
description
displayName
}
errors {
__typename
... on GraphQlError {
code
details {
__typename
}
message
}
}
}
}Variables
{
"input": {
"contentSelection": {
"filters": [
{
"segmentDefinitionId": "string"
}
],
"id": "string",
"properties": [
{
"id": "string"
}
],
"relations": [
{
"alias": "string",
"cardinality": "PLURAL",
"id": "string",
"target": {}
}
]
},
"destinationId": "id",
"displayName": "string",
"safeName": "string",
"versionId": "id"
}
}Response
{
"data": {
"createEndpoint": {
"endpoint": {
"activeContent": "value",
"apiVersion": {
"allowedOrigins": [
"value"
],
"applications": {
"__typename": "ApplicationsConnection"
},
"authentication": "PROTECTED",
"cardDefinitions": {
"__typename": "CardDefinitionsConnection"
},
"clusters": {
"__typename": "ClustersConnection"
},
"createdAt": "value"
},
"apiVersionId": "id",
"cardDefinitions": {
"edges": [
{
"__typename": "CardDefinitionsEdge"
}
],
"nodes": [
{
"__typename": "CardDefinition"
}
],
"pageInfo": {
"__typename": "PageInfo"
},
"totalCount": 1
},
"description": "string",
"displayName": "string"
},
"errors": [
{
"__typename": "GraphQlError",
"code": "string",
"details": [
{
"__typename": "KeyValuePairOfStringAndString"
}
],
"message": "string"
}
]
}
}
}Was this page helpful?