POST https://graph.microsoft.com/v1.0/search/acronyms
Content-Type: application/json
{
"displayName": "DNN",
"standsFor": "Deep Neural Network",
"description": "A deep neural network is a neural network with a certain level of complexity, a neural network with more than two layers.",
"webUrl": "http://microsoft.com/deep-neural-network",
"state": "draft"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models.Search;
var requestBody = new Acronym
{
DisplayName = "DNN",
StandsFor = "Deep Neural Network",
Description = "A deep neural network is a neural network with a certain level of complexity, a neural network with more than two layers.",
WebUrl = "http://microsoft.com/deep-neural-network",
State = AnswerState.Draft,
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Search.Acronyms.PostAsync(requestBody);
mgc search acronyms create --body '{\
"displayName": "DNN",\
"standsFor": "Deep Neural Network",\
"description": "A deep neural network is a neural network with a certain level of complexity, a neural network with more than two layers.",\
"webUrl": "http://microsoft.com/deep-neural-network",\
"state": "draft"\
}\
'
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphmodelssearch "github.com/microsoftgraph/msgraph-sdk-go/models/search"
//other-imports
)
requestBody := graphmodelssearch.NewAcronym()
displayName := "DNN"
requestBody.SetDisplayName(&displayName)
standsFor := "Deep Neural Network"
requestBody.SetStandsFor(&standsFor)
description := "A deep neural network is a neural network with a certain level of complexity, a neural network with more than two layers."
requestBody.SetDescription(&description)
webUrl := "http://microsoft.com/deep-neural-network"
requestBody.SetWebUrl(&webUrl)
state := graphmodels.DRAFT_ANSWERSTATE
requestBody.SetState(&state)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
acronyms, err := graphClient.Search().Acronyms().Post(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.models.search.Acronym acronym = new com.microsoft.graph.models.search.Acronym();
acronym.setDisplayName("DNN");
acronym.setStandsFor("Deep Neural Network");
acronym.setDescription("A deep neural network is a neural network with a certain level of complexity, a neural network with more than two layers.");
acronym.setWebUrl("http://microsoft.com/deep-neural-network");
acronym.setState(com.microsoft.graph.models.search.AnswerState.Draft);
com.microsoft.graph.models.search.Acronym result = graphClient.search().acronyms().post(acronym);
const options = {
authProvider,
};
const client = Client.init(options);
const acronym = {
displayName: 'DNN',
standsFor: 'Deep Neural Network',
description: 'A deep neural network is a neural network with a certain level of complexity, a neural network with more than two layers.',
webUrl: 'http://microsoft.com/deep-neural-network',
state: 'draft'
};
await client.api('/search/acronyms')
.post(acronym);
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\Search\Acronym;
use Microsoft\Graph\Generated\Models\Search\AnswerState;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new Acronym();
$requestBody->setDisplayName('DNN');
$requestBody->setStandsFor('Deep Neural Network');
$requestBody->setDescription('A deep neural network is a neural network with a certain level of complexity, a neural network with more than two layers.');
$requestBody->setWebUrl('http://microsoft.com/deep-neural-network');
$requestBody->setState(new AnswerState('draft'));
$result = $graphServiceClient->search()->acronyms()->post($requestBody)->wait();
Import-Module Microsoft.Graph.Search
$params = @{
displayName = "DNN"
standsFor = "Deep Neural Network"
description = "A deep neural network is a neural network with a certain level of complexity, a neural network with more than two layers."
webUrl = "http://microsoft.com/deep-neural-network"
state = "draft"
}
New-MgSearchAcronym -BodyParameter $params
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.search.acronym import Acronym
from msgraph.generated.models.answer_state import AnswerState
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = Acronym(
display_name = "DNN",
stands_for = "Deep Neural Network",
description = "A deep neural network is a neural network with a certain level of complexity, a neural network with more than two layers.",
web_url = "http://microsoft.com/deep-neural-network",
state = AnswerState.Draft,
)
result = await graph_client.search.acronyms.post(request_body)